curl-users
Re: very slow input from stdin
Date: Wed, 23 Apr 2003 14:21:24 +0200 (CEST)
On Tue, 22 Apr 2003 Bryan_Kemp_at_Dell.com wrote:
> echo -en1 | curl -T - http://someserver/directory/file.txt -H
> "Content-length: 1"
I tried this command line:
echo "more than one byte" | curl -T - -H "Content-Length: 1" [URL]
and this resulted in curl sending this request to the server:
--- start ---
PUT /bzz/60 HTTP/1.1
User-Agent: curl/7.10.5-pre1 [cut off the rest]
Host: 127.0.0.1:8999
Pragma: no-cache
Accept: image/gif, image/x-xbitmap, image/jpeg, image/pjpeg, */*
Transfer-Encoding: chunked
Content-Length: 1
13
more than one byte
0
--- end ---
(each line here had a trailing CRLF, even though not visible in my paste)
My guess is that the receiving end of your PUT request didn't like the mixed
information that the request contained. In fact, HTTP 1.1 explicitly says
that there must be no Content-Length header when chunked Transfer-Encoding is
used.
So, I don't think this is a curl error. Not that I can see anyway. Can you?
-- Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs. ------------------------------------------------------- This sf.net email is sponsored by:ThinkGeek Welcome to geek heaven. http://thinkgeek.com/sfReceived on 2003-04-23