curl-users
Re: Changes to http uploads
Date: Mon, 9 Feb 2004 17:13:40 +0100 (CET)
On Sun, 8 Feb 2004, Bryan Kemp wrote:
(Moved over from the old list)
> I recently updated versions of Curl from 7.9.8 to 7.10.4 and I can no longer
> post files to an IIS web-server. The command line I use is very similar to:
>
> echo -en text | curl -s -T - http://someserver/somedirectory/file -h
> "Content Length: 4"
It take it you meant a -H, not -h...
> When I updated curl, it hangs and never performs the upload using the same
> command line. I have also tried version 7.11.0 and it has the same behavior.
> Any ideas what may have changed to cause the issue ( I moved back to 7.9.8
> and it works fine). Also what can I do to help trouble shoot?
Some time ago we switched over to use chunked transfer-encoding when you
upload from stdin, since the size cannot be known then. However, I just
recently was alerted that this (as you describe) particular use case is indeed
valid.
In this case, for you, curl will enable chunked transfer-encoding and upload
this accordingly. I have no idea why it "hangs". Possibly because the server
gets confused by both a chunked header (and chunked body) and a
Content-Length. I could not repeat a hang on my local test server, but I
haven't actually tried using the 7.11.0 release code.
I've adjusted the code in CVS to allow the chunked encoding to be possible to
switch off, which it couldn't in 7.11.0. If you get curl off CVS or a recent
daily snapshot, try this:
echo -en test |curl -T - -H "Transfer-Encoding:" -H "Content-Length: 4"
Seems to work for me.
-- Daniel Stenberg -- http://curl.haxx.se/ -- http://daniel.haxx.se/ [[ Do not send mails to this email address. They won't reach me. ]]Received on 2004-02-09