cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: very slow input from stdin

From: <Bryan_Kemp_at_Dell.com>
Date: Wed, 23 Apr 2003 08:23:50 -0500

 I don't know how much of a difference it makes but the command line should
have been (me and my fat fingers....)
echo -en 1 | curl -T - http://someserver/directory/filex.txt -H
"Content-length: 1"

We use this to update a status on a web server.
-bryan

-----Original Message-----
From: Daniel Stenberg
To: Curl Mailinglist
Cc: Hyden, Bill
Sent: 4/23/2003 7:21 AM
Subject: Re: very slow input from stdin

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/sf
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-04-23