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,14 +54,11 @@ event http_entity_data(c: connection, is_orig: bool, length: count, data: string
|
|||
## incorrect anyway.
|
||||
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);
|
||||
if ( c$http$calculating_md5 )
|
||||
{
|
||||
c$http$calculating_md5 = F;
|
||||
md5_hash_finish(c$id);
|
||||
}
|
||||
c$http$calculating_md5 = F;
|
||||
md5_hash_finish(c$id);
|
||||
}
|
||||
|
||||
## When the file finishes downloading, finish the hash and generate a notice.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue