Forum Discussion
hooleylist
Jan 22, 2009Cirrostratus
You can get the Content-Length header value using 'HTTP::header value "Content-Length"'. Note that if the server responds with chunked encoding there wouldn't be a Content-Length header and [HTTP::header value "Content-Length"] would return a null length string.
when HTTP_RESPONSE {
Check if response code is a 404 and the Content-Length header value is 0
if {[HTTP::status] == 404 && [HTTP::header value "Content-Length"] == 0}{
Do something?
log local0. "[IP::client_addr]:[TCP::client_port]: Found 404 response with 0 Content-Length"
}
}
Aaron