On Tue, Feb 17, 2015 at 9:47 PM, Bernhard Reutner-Fischer <[email protected]> wrote: > https://bugs.debian.org/744725 > > wget is appending instead of replacing with "--header" > > To quote current big wget docs > http://www.gnu.org/software/wget/manual/html_node/HTTP-Options.html > > <quote> > ‘--header=header-line’ > Send header-line along with the rest of the headers in each HTTP request. The > supplied header is sent as-is, which means it must contain name and value > separated by colon, and must not contain newlines. > > You may define more than one additional header by specifying ‘--header’ more > than once. > > wget --header='Accept-Charset: iso-8859-2' \ > --header='Accept-Language: hr' \ > http://fly.srk.fer.hr/ > Specification of an empty string as the header value will clear all previous > user-defined headers. > > As of Wget 1.10, this option can be used to override headers otherwise > generated automatically. This example instructs Wget to connect to localhost, > but to specify ‘foo.bar’ in the Host header: > > wget --header="Host: foo.bar" http://localhost/ > In versions of Wget prior to 1.10 such use of ‘--header’ caused sending of > duplicate headers. > </quote> > > I'm attaching 2 variants to implement the "override headers" part that was > introduced in the big wget in 1.10. As i'm just now seeing that "clear all > previous user headers" so that part is not implemented and i'm not sure how > useful it is in practise (i would not blindly add it). > Neither variant make me particularly happy and i'm not sure how to phrase > it better right now. > > Better ideas? > Denys, is one of this variants good enough to apply as is for now?
I applied fwd-wget-user-headers.00.patch Thanks! _______________________________________________ busybox mailing list [email protected] http://lists.busybox.net/mailman/listinfo/busybox
