busybox wget Transfer-Encoding chunked
Steve W.
busyboxlist.47a2f9 at spam.linuks.lt
Fri Dec 7 08:18:05 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 [1]",
"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 [1]",
"User-Agent": "Wget/1.17.1 (linux-gnueabihf)"
Is that because of some custom compile flags used by Openwrt?
Is there a way to make busybox to supply content-length during POST
request?
Thanks,
Steve
Links:
------
[1] http://httpbin.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20181207/3b8cb677/attachment.html>
More information about the busybox
mailing list