mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Switch to recording unmodified HTTP header.
We used to attempt to remove any port specification before recording HTTP host headers in logs. Doing so would (1) remove potentially useful information, (2) not match what the documentation seemed to suggest, and (3) fail for IP6 addresses containing colons. We now record the original HOST header as is. Addresses #1844.
This commit is contained in:
parent
1e60264548
commit
a7427e95bf
6 changed files with 10 additions and 8 deletions
|
@ -263,8 +263,9 @@ event http_header(c: connection, is_orig: bool, name: string, value: string) &pr
|
|||
c$http$referrer = value;
|
||||
|
||||
else if ( name == "HOST" )
|
||||
# The split is done to remove the occasional port value that shows up here.
|
||||
c$http$host = split_string1(value, /:/)[0];
|
||||
# Per #1844, we record the original host header, including any port
|
||||
# specification if present.
|
||||
c$http$host = value;
|
||||
|
||||
else if ( name == "RANGE" )
|
||||
c$http$range_request = T;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue