Skip to content

Commit

Permalink
erasing Expect iterates entire header table
Browse files Browse the repository at this point in the history
  • Loading branch information
cmazakas committed Feb 27, 2024
1 parent 7762b28 commit b911eee
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/detail/header.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -751,7 +751,7 @@ on_erase_expect()
return;
*/
// reset and re-insert
auto n = md.expect.count;
auto n = count;
auto const p = cbuf + prefix;
auto const* e = &tab()[0];
md.expect = {};
Expand Down
2 changes: 2 additions & 0 deletions test/unit/fields_base.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1271,7 +1271,9 @@ struct fields_base_test
req.count(field::expect), 1);
},
"POST / HTTP/1.1\r\n"
"Content-Length: 1234\r\n"
"Expect: 100-continue\r\n"
"Connection: close\r\n"
"Expect: 404-not-found\r\n"
"\r\n");

Expand Down

0 comments on commit b911eee

Please sign in to comment.