mirror of
https://github.com/zeek/zeek.git
synced 2025-10-08 09:38:19 +00:00
Fix when HTTP header are on several packet
This commit is contained in:
parent
8cabecec40
commit
83f4903250
2 changed files with 10 additions and 6 deletions
|
@ -511,9 +511,6 @@ void HTTP_Entity::SubmitAllHeaders()
|
||||||
// in_header should be set to false when SubmitAllHeaders() is called.
|
// in_header should be set to false when SubmitAllHeaders() is called.
|
||||||
ASSERT(! in_header);
|
ASSERT(! in_header);
|
||||||
|
|
||||||
if (content_length >= 0 )
|
|
||||||
http_message->SetDeliverySize(content_length);
|
|
||||||
|
|
||||||
if ( DEBUG_http )
|
if ( DEBUG_http )
|
||||||
DEBUG_MSG("%.6f end of headers\n", run_state::network_time);
|
DEBUG_MSG("%.6f end of headers\n", run_state::network_time);
|
||||||
|
|
||||||
|
@ -531,6 +528,9 @@ void HTTP_Entity::SubmitAllHeaders()
|
||||||
http_message->content_line->SetCRLFAsEOL(0);
|
http_message->content_line->SetCRLFAsEOL(0);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (content_length >= 0 )
|
||||||
|
http_message->SetDeliverySize(content_length);
|
||||||
|
|
||||||
// The presence of a message-body in a request is signaled by
|
// The presence of a message-body in a request is signaled by
|
||||||
// the inclusion of a Content-Length or Transfer-Encoding
|
// the inclusion of a Content-Length or Transfer-Encoding
|
||||||
// header field in the request's message-headers.
|
// header field in the request's message-headers.
|
||||||
|
|
|
@ -99,10 +99,14 @@ void ContentLine_Analyzer::DeliverStream(int len, const u_char* data,
|
||||||
|
|
||||||
// If we have parsed all the data of the packet but there is no CRLF at the end
|
// If we have parsed all the data of the packet but there is no CRLF at the end
|
||||||
// Force the process by flushing buffer
|
// Force the process by flushing buffer
|
||||||
if ( delivery_length == 0 && HasPartialLine() )
|
if ( delivery_length == 0 )
|
||||||
{
|
{
|
||||||
Weird("No CRLF at the end of the packet");
|
if (HasPartialLine())
|
||||||
DoDeliver(2, (const u_char*) "\r\n");
|
{
|
||||||
|
Weird("line_terminated_without_CRLF");
|
||||||
|
DoDeliver(2, (const u_char*) "\r\n");
|
||||||
|
}
|
||||||
|
delivery_length = -1;
|
||||||
}
|
}
|
||||||
|
|
||||||
seq += len;
|
seq += len;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue