[prev in list] [next in list] [prev in thread] [next in thread] 

List:       busybox
Subject:    Re: busybox wget Transfer-Encoding chunked
From:       "Steve W." <busyboxlist.47a2f9 () spam ! linuks ! lt>
Date:       2018-12-07 8:31:25
Message-ID: d5cb7417ff7bf28a8591132a5d0cf6d6 () spam ! linuks ! lt
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


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@busybox.net
> http://lists.busybox.net/mailman/listinfo/busybox
 

Links:
------
[1] http://httpbin.org


[Attachment #5 (unknown)]

<html><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8" \
/></head><body style='font-size: 10pt; font-family: Verdana,Geneva,sans-serif'> \
<p>Oh, sorry</p> <p>Only now noticed that user agent is "uclient-fetch", and wget is \
actually symlinked to that instead of busybox on my Openwrt box.</p> <p>Sorry for \
confusion</p> <p>2018-12-07 10:18, Steve W. ra&scaron;ė:</p>
<blockquote type="cite" style="padding: 0 0.4em; border-left: #1010ff 2px solid; \
margin: 0"><!-- html ignored --><!-- head ignored --><!-- meta ignored --> <p>Hi,<br \
/><br /> 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<br /><br /> The issue is that my web application \
expects Content-Length and does not support chunked transfer<br /><br /> Here is an \
example:<br /><br /> wget --post-data="a=b" <a href="http://httpbin.org/post" \
target="_blank" rel="noreferrer">http://httpbin.org/post</a> -O -<br /><br /> \
Gives:<br /><br /> "headers": {<br /> &nbsp; &nbsp; "Connection": "close",<br /> \
&nbsp; &nbsp; "Content-Type": "application/x-www-form-urlenc<wbr />oded",<br /> \
&nbsp; &nbsp; "Host": "<a href="http://httpbin.org" target="_blank" \
rel="noreferrer">httpbin.org</a>",<br /> &nbsp; &nbsp; "Transfer-Encoding": \
"chunked",<br /> &nbsp; &nbsp; "User-Agent": "uclient-fetch"<br /><br /><br /> 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<br /><br /> &nbsp;"headers": {<br /> &nbsp; &nbsp; "Accept": "*/*",<br /> \
&nbsp; &nbsp; "Accept-Encoding": "identity",<br /> &nbsp; &nbsp; "Connection": \
"close",<br /> &nbsp; &nbsp; "Content-Length": "3",<br /> &nbsp; &nbsp; \
"Content-Type": "application/x-www-form-urlenc<wbr />oded",<br /> &nbsp; &nbsp; \
"Host": "<a href="http://httpbin.org" target="_blank" \
rel="noreferrer">httpbin.org</a>",<br /> &nbsp; &nbsp; "User-Agent": "Wget/1.17.1 \
(linux-gnueabihf)"<br /><br /><br />Is that because of some custom compile flags used \
by Openwrt?<br />Is there a way to make busybox to supply content-length during POST \
request?<br /><br /> Thanks,<br /> Steve</p> <!-- html ignored --><br />
<div class="pre" style="margin: 0; padding: 0; font-family: \
monospace">_______________________________________________<br /> busybox mailing \
list<br /><a href="mailto:busybox@busybox.net" \
rel="noreferrer">busybox@busybox.net</a><br /><a \
href="http://lists.busybox.net/mailman/listinfo/busybox" target="_blank" \
rel="noreferrer">http://lists.busybox.net/mailman/listinfo/busybox</a></div> \
</blockquote> </body></html>



_______________________________________________
busybox mailing list
busybox@busybox.net
http://lists.busybox.net/mailman/listinfo/busybox


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic