mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
BIT-1077: fix HTTP::log_server_header_names.
Before, it just re-logged fields from the client side.
This commit is contained in:
parent
5e2defebe5
commit
c09411bc8b
3 changed files with 44 additions and 11 deletions
|
@ -26,20 +26,25 @@ export {
|
|||
|
||||
event http_header(c: connection, is_orig: bool, name: string, value: string) &priority=3
|
||||
{
|
||||
if ( ! is_orig || ! c?$http )
|
||||
if ( ! c?$http )
|
||||
return;
|
||||
|
||||
if ( log_client_header_names )
|
||||
|
||||
if ( is_orig )
|
||||
{
|
||||
if ( ! c$http?$client_header_names )
|
||||
c$http$client_header_names = vector();
|
||||
c$http$client_header_names[|c$http$client_header_names|] = name;
|
||||
if ( log_client_header_names )
|
||||
{
|
||||
if ( ! c$http?$client_header_names )
|
||||
c$http$client_header_names = vector();
|
||||
c$http$client_header_names[|c$http$client_header_names|] = name;
|
||||
}
|
||||
}
|
||||
|
||||
if ( log_server_header_names )
|
||||
else
|
||||
{
|
||||
if ( ! c$http?$server_header_names )
|
||||
c$http$server_header_names = vector();
|
||||
c$http$server_header_names[|c$http$server_header_names|] = name;
|
||||
if ( log_server_header_names )
|
||||
{
|
||||
if ( ! c$http?$server_header_names )
|
||||
c$http$server_header_names = vector();
|
||||
c$http$server_header_names[|c$http$server_header_names|] = name;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue