zeek/policy/protocols/http/headers.bro
Seth Hall cee3991822 Script updates.
- Fixing more vestiges from moving site.bro and removing functions.bro

- Updates comments on analysis-groups.bro

- Added the trim-trace-file script from broctl.
2011-07-19 10:41:54 -04:00

25 lines
612 B
Text

##! Extract and include the header keys used for each request in the log.
@load protocols/http
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;
}