mirror of
https://github.com/zeek/zeek.git
synced 2025-10-02 06:38:20 +00:00
Slightly fix up file name extraction from Content-Disposition headers.
This commit is contained in:
parent
95ffb1cf27
commit
f956554c74
1 changed files with 1 additions and 1 deletions
|
@ -19,7 +19,7 @@ function generate_extraction_filename(prefix: string, c: connection, suffix: str
|
|||
## the filename.
|
||||
function extract_filename_from_content_disposition(data: string): string
|
||||
{
|
||||
local filename = sub(data, /^.*[fF][iI][lL][eE][nN][aA][mM][eE]=/, "");
|
||||
local filename = sub(data, /^.*[fF][iI][lL][eE][nN][aA][mM][eE][[:blank:]]*=[[:blank:]]*/, "");
|
||||
# Remove quotes around the filename if they are there.
|
||||
if ( /^\"/ in filename )
|
||||
filename = split_n(filename, /\"/, F, 2)[2];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue