Opened 5 years ago

Last modified 5 years ago

#7851 reopened defect

two User-Agent headers appear in the result

Reported by: abu Owned by:
Priority: normal Component: undetermined
Version: git-master Keywords:
Cc: Blocked By:
Blocking: Reproduced by developer: no
Analyzed by developer: no

Description

Command :

ffmpeg -headers "Accept:*/*" -headers "Accept-Encoding:gzip, deflate, br" -headers "Accept-Language:zh-CN,zh;q=0.9,en;q=0.8" -headers "Origin:https://pc-shop.xiaoe-tech.com" -headers "Referer:https://pc-shop.xiaoe-tech.com/appzDSBtscz6568/video_details?id=v_5b0e8459e1ff5_nSu4umqK" -headers "User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36" -i "https://httpbin.org" -v trace

After setting , two User-Agent headers appear in the result

User-Agent: Lavf/58.20.100
Accept: */*
Range: bytes=0-
Connection: close
Host: httpbin.org
Icy-MetaData: 1
User-Agent:Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121 Safari/537.36

The difference is that there is a space in front of the first User-Agent header value, while not for the second . I don't know what's wrong here, if it is not a bug , it would be better to specify the behavior in the document.

Change History (3)

comment:1 by abu, 5 years ago

if adding a space in front of the User-Agent header value in the command , that is,

D:\LYYDownloader-dev\ffmpeg -headers "Accept:*/*" -headers "Accept-Encoding:gzip, deflate, br" -headers "Accept-Language:zh-CN,zh;q=0.9,en;q=0.8" -headers "Origin:https://pc-shop.xiaoe-tech.com" -headers "Referer:https://pc-shop.xiaoe-tech.com/appzDSBtscz6568/video_details?id=v_5b0e8459e1ff5_nSu4umqK" -headers "User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/72.0.3626.121Safari/537.36" -i "https://httpbin.org" -v trace

then there is only one User-Agent header appear in the result

Accept: */*
Range: bytes=0-
Connection: close
Host: httpbin.org
Icy-MetaData: 1
User-Agent: Mozilla/5.0 (Windows NT 6.1) AppleWebKit/537.36 (KHTML, like Gecko)Chrome/72.0.3626.121Safari/537.36

comment:2 by Carl Eugen Hoyos, 5 years ago

Resolution: invalid
Status: newclosed
Version: 4.1unspecified

You will have to quote the rfc if you believe that the described behaviour is not valid.
For future tickets please remember that only current FFmpeg git head is supported on this bug tracker.

in reply to:  2 comment:3 by abu, 5 years ago

Resolution: invalid
Status: closedreopened
Version: unspecifiedgit-master

Replying to cehoyos:

You will have to quote the rfc if you believe that the described behaviour is not valid.
For future tickets please remember that only current FFmpeg git head is supported on this bug tracker.

But it is obviously redundant to have two User-Agent headers in one http request , and the issue still exists in the git-master version.

Note: See TracTickets for help on using tickets.