mirror of
https://github.com/zeek/zeek.git
synced 2025-10-17 05:58:20 +00:00
parent
af6c7c8b1a
commit
f32b567c85
1 changed files with 5 additions and 5 deletions
|
@ -1,25 +0,0 @@
|
|||
##! Extract and include the header keys used for each request in the log.
|
||||
|
||||
@load base/protocols/http/main
|
||||
|
||||
module HTTP;
|
||||
|
||||
export {
|
||||
redef record Info += {
|
||||
## The vector of HTTP headers. No header values are included here, just
|
||||
## the header names.
|
||||
## TODO: with an empty vector as &default, the vector isn't coerced to the
|
||||
## correct type.
|
||||
headers: vector of string &log &optional;
|
||||
};
|
||||
}
|
||||
|
||||
event http_header(c: connection, is_orig: bool, name: string, value: string) &priority=4
|
||||
{
|
||||
if ( ! is_orig )
|
||||
return;
|
||||
|
||||
if ( ! c$http?$headers )
|
||||
c$http$headers = vector();
|
||||
c$http$headers[|c$http$headers|] = name;
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue