mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 14:48:21 +00:00
Slightly restructured http file hashing to fix a bug.
This commit is contained in:
parent
43da40f2c6
commit
8b56c54348
1 changed files with 4 additions and 7 deletions
|
@ -54,15 +54,12 @@ event http_entity_data(c: connection, is_orig: bool, length: count, data: string
|
||||||
## incorrect anyway.
|
## incorrect anyway.
|
||||||
event content_gap(c: connection, is_orig: bool, seq: count, length: count) &priority=5
|
event content_gap(c: connection, is_orig: bool, seq: count, length: count) &priority=5
|
||||||
{
|
{
|
||||||
if ( is_orig || ! c?$http ) return;
|
if ( is_orig || ! c?$http || ! c$http$calculating_md5 ) return;
|
||||||
|
|
||||||
set_state(c, F, is_orig);
|
set_state(c, F, is_orig);
|
||||||
if ( c$http$calculating_md5 )
|
|
||||||
{
|
|
||||||
c$http$calculating_md5 = F;
|
c$http$calculating_md5 = F;
|
||||||
md5_hash_finish(c$id);
|
md5_hash_finish(c$id);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
## When the file finishes downloading, finish the hash and generate a notice.
|
## When the file finishes downloading, finish the hash and generate a notice.
|
||||||
event http_message_done(c: connection, is_orig: bool, stat: http_message_stat) &priority=-3
|
event http_message_done(c: connection, is_orig: bool, stat: http_message_stat) &priority=-3
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue