busybox wget Transfer-Encoding chunked

Steve W. busyboxlist.47a2f9 at spam.linuks.lt
Fri Dec 7 08:31:25 UTC 2018


Oh, sorry 

Only now noticed that user agent is "uclient-fetch", and wget is
actually symlinked to that instead of busybox on my Openwrt box. 

Sorry for confusion 

2018-12-07 10:18, Steve W. rašė:

> 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 
> _______________________________________________
> busybox mailing list
> busybox at busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
 

Links:
------
[1] http://httpbin.org
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/busybox/attachments/20181207/7cfde2ca/attachment.html>


More information about the busybox mailing list