mirror of
https://github.com/zeek/zeek.git
synced 2025-10-07 00:58:19 +00:00
Fix handling of HTTP 1xx response codes (addresses #411).
Changed the parser to not treat 1xx response codes as a final answer to an unanswered request -- a later response is still expected. The scripting layer will also not finish a request-reply pair when seeing 1xx's, instead it logs both the 1xx and final response messages with associated information of the current request as they're seen.
This commit is contained in:
parent
24bb14390b
commit
64e821624b
5 changed files with 31 additions and 4 deletions
|
@ -1305,7 +1305,9 @@ void HTTP_Analyzer::ReplyMade(const int interrupted, const char* msg)
|
|||
if ( reply_message )
|
||||
reply_message->Done(interrupted, msg);
|
||||
|
||||
if ( ! unanswered_requests.empty() )
|
||||
// 1xx replies do not indicate the final response to a request,
|
||||
// so don't pop an unanswered request in that case.
|
||||
if ( reply_code/100 != 1 && ! unanswered_requests.empty() )
|
||||
{
|
||||
Unref(unanswered_requests.front());
|
||||
unanswered_requests.pop();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue