mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 22:58:20 +00:00
Remove unneeded allocations for HTTP messages.
This commit is contained in:
parent
a87b22cd0a
commit
a7373a1ca4
3 changed files with 9 additions and 2 deletions
4
CHANGES
4
CHANGES
|
@ -1,4 +1,8 @@
|
||||||
|
|
||||||
|
2.3-172 | 2014-09-15 13:38:52 -0500
|
||||||
|
|
||||||
|
* Remove unneeded allocations for HTTP messages. (Jon Siwek)
|
||||||
|
|
||||||
2.3-171 | 2014-09-15 11:14:57 -0500
|
2.3-171 | 2014-09-15 11:14:57 -0500
|
||||||
|
|
||||||
* Fix a compile error on systems without pcap-int.h. (Jon Siwek)
|
* Fix a compile error on systems without pcap-int.h. (Jon Siwek)
|
||||||
|
|
2
VERSION
2
VERSION
|
@ -1 +1 @@
|
||||||
2.3-171
|
2.3-172
|
||||||
|
|
|
@ -545,7 +545,7 @@ HTTP_Message::HTTP_Message(HTTP_Analyzer* arg_analyzer,
|
||||||
|
|
||||||
current_entity = 0;
|
current_entity = 0;
|
||||||
top_level = new HTTP_Entity(this, 0, expect_body);
|
top_level = new HTTP_Entity(this, 0, expect_body);
|
||||||
entity_data_buffer = new char[http_entity_data_delivery_size];
|
entity_data_buffer = 0;
|
||||||
BeginEntity(top_level);
|
BeginEntity(top_level);
|
||||||
|
|
||||||
start_time = network_time;
|
start_time = network_time;
|
||||||
|
@ -718,6 +718,9 @@ void HTTP_Message::SubmitData(int len, const char* buf)
|
||||||
|
|
||||||
int HTTP_Message::RequestBuffer(int* plen, char** pbuf)
|
int HTTP_Message::RequestBuffer(int* plen, char** pbuf)
|
||||||
{
|
{
|
||||||
|
if ( ! entity_data_buffer )
|
||||||
|
entity_data_buffer = new char[http_entity_data_delivery_size];
|
||||||
|
|
||||||
*plen = http_entity_data_delivery_size;
|
*plen = http_entity_data_delivery_size;
|
||||||
*pbuf = entity_data_buffer;
|
*pbuf = entity_data_buffer;
|
||||||
return 1;
|
return 1;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue