Opened 10 years ago

Closed 9 years ago

#3806 closed defect (fixed)

http: get_cookies() breaks for cookies with unexpected parameters and for parameters with spaces

Reported by: Nick Ayers Owned by:
Priority: normal Component: avformat
Version: git-master Keywords: http cookie
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

If a site sets a cookie that includes (for example) the HttpOnly parameter get_cookies() fails to return that cookie for use with subsequent requests. Instead "Cookie: HttpOnly" is sent to the server.

Also if a site sets the Expires parameter (which includes spaces by definition) the parsing breaks due to the "; " delimiter list to av_strtok and "Cookie: GMT" will be sent instead of the real cookie.

Ugly hack that fixes these 2 cases but will break for any other unknown cookie parameters attached.

Attachments (1)

cookies.patch (1.8 KB ) - added by Nick Ayers 10 years ago.

Download all attachments as: .zip

Change History (3)

by Nick Ayers, 10 years ago

Attachment: cookies.patch added

comment:1 by Carl Eugen Hoyos, 10 years ago

Please send two patches that do not include any white space changes to the ffmpeg-devel mailing list where patches are discussed and can be reviewed. Patches on this bug tracker are usually ignored.

comment:2 by Carl Eugen Hoyos, 9 years ago

Resolution: fixed
Status: newclosed

I believe this was fixed by Nicolas George in 481cbc5a and 4bebce06
Please reopen this ticket if the issue is still reproducible with current FFmpeg git head or 2.4.

Note: See TracTickets for help on using tickets.