Re: [Fwd: Bug#366434: wget: Multiple 'Pragma:' headers not supported]
Noèl Köthe wrote: Hello, a forwarded report from http://bugs.debian.org/366434 could this behaviour be added to the doc/manpage? i wonder if it makes sense to add generic support for multiple headers in wget, for instance by extending the --header option like this: wget --header=Pragma: xxx --header=dontoverride,Pragma: xxx2 someurl as an alternative, we could choose to support multiple headers only for a few header types, like Pragma. however, i don't really like this second choise, as it would require to hardcode the above mentioned header names in the wget sources, which IMVHO is a *VERY* bad practice. what do you think? -- Aequam memento rebus in arduis servare mentem... Mauro Tortonesi http://www.tortonesi.com University of Ferrara - Dept. of Eng.http://www.ing.unife.it GNU Wget - HTTP/FTP file retrieval tool http://www.gnu.org/software/wget Deep Space 6 - IPv6 for Linuxhttp://www.deepspace6.net Ferrara Linux User Group http://www.ferrara.linux.it
Re: [Fwd: Bug#366434: wget: Multiple 'Pragma:' headers not supported]
Mauro Tortonesi [EMAIL PROTECTED] writes: Noèl Köthe wrote: Hello, a forwarded report from http://bugs.debian.org/366434 could this behaviour be added to the doc/manpage? i wonder if it makes sense to add generic support for multiple headers in wget, for instance by extending the --header option like this: Or by adding a `--append-header' with that functionality. Originally --header always appended, but the problem was that people sometimes wanted to change the headers issued by Wget. The reason I didn't introduce (in fact keep) append was that HTTP pretty much disallows duplicate headers. According to HTTP, a duplicate header field is equivalent to a single header header with multiple values joined using the , separator -- which the bug report mentions.
[Fwd: Bug#366434: wget: Multiple 'Pragma:' headers not supported]
Hello, a forwarded report from http://bugs.debian.org/366434 could this behaviour be added to the doc/manpage? thx. Package: wget Version: 1.10.2-1 It's meaningful to have multiple 'Pragma:' headers within an http request, but wget will silently issue only a single one of them if they are specified within separate arguments. For example, [EMAIL PROTECTED] /tmp]$ wget -U 'NSPlayer/4.1.0.3856' --header='Pragma: no-cache,rate=1.00,stream-time=0,stream-offset=0:0,request-context=2,max-duration=0' --header='Pragma: xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278}' --header='Pragma: xPlayStrm=1' --header='Pragma: stream-switch-count=1' --header='Pragma: stream-switch-entry=:1:0' http://wms.scripps.com:80/knoxville/siler/siler.mp3 ... doesn't work, and inspection with ethereal reveals that wget is only sending the last 'Pragma:' header given. Compressing all the 'Pragma' directives into a single header makes the fetch work: [EMAIL PROTECTED] /tmp]$ wget -U 'NSPlayer/4.1.0.3856' --header='Pragma: no-cache,rate=1.00,stream-time=0,stream-offset=0:0,request-context=2,max-duration=0,xClientGUID={c77e7400-738a-11d2-9add-0020af0a3278},xPlayStrm=1,stream-switch-count=1,stream-switch-entry=:1:0' http://wms.scripps.com:80/knoxville/siler/siler.mp3 -- Noèl Köthe noel debian.org Debian GNU/Linux, www.debian.org signature.asc Description: Dies ist ein digital signierter Nachrichtenteil