Skip to content

Commit

Permalink
fw/http_parser: Reset internal parser state after if-modified-since
Browse files Browse the repository at this point in the history
… hdr parsing

Signed-off-by: Petr Vyazovik <[email protected]>
  • Loading branch information
s0nx committed Oct 17, 2022
1 parent d8de3d2 commit 50e7870
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions fw/http_parser.c
Original file line number Diff line number Diff line change
Expand Up @@ -10277,6 +10277,7 @@ void
tfw_idx_hdr_parse_if_mod_since(TfwHttpReq *req, TfwStr *hdr)
{
TfwStr *c, *end;
TfwHttpParser *parser;
int ret = CSTR_NEQ;

TFW_STR_FOR_EACH_CHUNK(c, hdr, end) {
Expand All @@ -10288,6 +10289,10 @@ tfw_idx_hdr_parse_if_mod_since(TfwHttpReq *req, TfwStr *hdr)
}
}

/* Parser internal state has to be reset */
parser = &((TfwHttpMsg *)req)->stream->parser;
parser->_i_st = NULL;

T_DBG3("%s: req->cond.m_date: %lu\n", __func__, req->cond.m_date);
}

Expand Down

0 comments on commit 50e7870

Please sign in to comment.