mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
analyzers/http: Update request_version on subsequent SetVersion() calls
The #124 PR introduced special treatment when HTTP version 0.9 was set. With #127, a reproducer that set HTTP/1.0 in the first request was created and subsequent requests wouldn't reset to HTTP version 0.9. This is subtle, but doesn't seem like things fall apart. Improves runtime from 20 seconds to 2 seconds for the given reproducer. Fixes #127.
This commit is contained in:
parent
9a96e3b52a
commit
3af6b97c63
1 changed files with 3 additions and 0 deletions
|
@ -1339,7 +1339,10 @@ void HTTP_Analyzer::SetVersion(HTTP_VersionNumber* version, HTTP_VersionNumber n
|
|||
*version = new_version;
|
||||
|
||||
else if ( *version != new_version )
|
||||
{
|
||||
Weird("HTTP_version_mismatch");
|
||||
*version = new_version;
|
||||
}
|
||||
|
||||
if ( version->major > 1 || (version->major == 1 && version->minor > 0) )
|
||||
keep_alive = 1;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue