bug in busybox with http redirects
Denys Vlasenko
vda.linux at googlemail.com
Sun Dec 18 04:17:41 UTC 2011
On Friday 16 December 2011 16:57, Natanael Copa wrote:
> Hi,
>
> I have a pretty annoying issue with busybox wget and http redirects:
>
> busybox wget http://git.alpinelinux.org/cgit/acf-tinydns.git/snapshot/acf-tinydns-0.7.0.tar.bz2
>
> $ busybox wget -O /dev/null
> http://git.alpinelinux.org/cgit/acf-tinydns.git/snapshot/acf-tinydns-0.7.0.tar.bz2
> Connecting to git.alpinelinux.org (91.220.88.36:80)
> wget: server returned error: HTTP/1.1 400 Bad Request
>
> With GNU wget:
> $ wget -O /dev/null http://git.alpinelinux.org/cgit/acf-tinydns.g
> it/snapshot/acf-tinydns-0.7.0.tar.bz2
> --2011-12-16 16:45:01--
> http://git.alpinelinux.org/cgit/acf-tinydns.git/snapshot/acf-tinydns-0.7.0.tar.bz2
> Resolving git.alpinelinux.org... 91.220.88.36
> Connecting to git.alpinelinux.org|91.220.88.36|:80... connected.
> HTTP request sent, awaiting response... 301 Moved Permanently
> Location: /cgit/acf-tinydns/snapshot/acf-tinydns-0.7.0.tar.bz2 [following]
> --2011-12-16 16:45:01--
> http://git.alpinelinux.org/cgit/acf-tinydns/snapshot/acf-tinydns-0.7.0.tar.bz2
> Reusing existing connection to git.alpinelinux.org:80.
> HTTP request sent, awaiting response... 200 OK
> Length: unspecified [application/x-bzip2]
> Saving to: `/dev/null'
>
> [ <=> ] 10,917 --.-K/s in 0.07s
>
> 2011-12-16 16:45:01 (147 KB/s) - `/dev/null' saved [10917]
>
> works also with curl --location.
>
> It has been like that for a while.
>
> I intended to git bisect it but when trying to build older commits i get:
>
> Makefile:1270: *** mixed implicit and normal rules. Stop.
>
> so I gave up try find the exact commit where it was introduced.
>
>
> When I look at the wireshark "folow TCP stream" i see this:
> GET /cgit/acf-tinydns/snapshot/acf-tinydns-0.7.0.tar.bz2 HTTP/1.1
>
> Host: f-tinydns/snapshot/acf-tinydns-0.7.0.tar.bz2
>
> User-Agent: Wget
>
> Connection: close
>
>
>
> HTTP/1.1 400 Bad Request
>
> ...
>
> so looks like wget does something strange with the "host" header on
> the redirection.
Should be fixed by commit 93b4a605263612cf32ad9de746a4fafaf4515115
--
vda
More information about the busybox
mailing list