busybox wget Transfer-Encoding chunked
Steve W.
busyboxlist.47a2f9 at spam.linuks.lt
Thu Dec 6 14:08:43 UTC 2018
Hi,
I experience an issue with Busybox wget running on a Openwrt box, version "BusyBox v1.28.3". When sending a POST request wget uses Transfer-Encoding "chunked" and does not provide Content-Length
The issue is that my web application expects Content-Length and does not support chunked transfer
Here is an example:
wget --post-data="a=b" http://httpbin.org/post -O -
Gives:
"headers": {
"Connection": "close",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "httpbin.org",
"Transfer-Encoding": "chunked",
"User-Agent": "uclient-fetch"
The payload string "a=b" is of known length so there should be no problem to provide the content length. And I checked standard wget implementation (shipped with Ubuntu 16.04) - it does not use chunked transfer and correctly specifies the content length
"headers": {
"Accept": "*/*",
"Accept-Encoding": "identity",
"Connection": "close",
"Content-Length": "3",
"Content-Type": "application/x-www-form-urlencoded",
"Host": "httpbin.org",
"User-Agent": "Wget/1.17.1 (linux-gnueabihf)"
Is there a way to make busybox to supply content-length during POST request?
Thanks,
Steve
More information about the busybox
mailing list