cURL / Mailing Lists / curl-users / Single Mail

curl-users

RE: cURL truncating upload file

From: Daniel Stenberg <daniel-curl_at_haxx.se>
Date: Wed, 6 Oct 2004 14:45:19 +0200 (CEST)

On Wed, 6 Oct 2004, James Smith wrote:

> It is also worth noting that curl behaves differently depending on how it is
> executed.
>
> 1) DIRECTLY FROM THE COMMAND LINE - Seems to work ok (although more testing
> is needed).
> 2) FROM A BATCH FILE ON THE COMMAND LINE - As above.
> 3) DIRECTLY FROM THE SCRIPT - Small files work, larger ones work but curl
> doesn't exit.
> 4) FROM A BATCH FILE FROM THE SCRIPT - As above.

curl is the same and works the same no matter how you start it. If it behaves
differently, I blame your environment that starts/runs it or just pure
coincidence.

> When it fails to exit, the trace file is showing some peculiarity, all of
> the transmitted info is there but at some point after the end of the file
> data it stops. A correct execution complete with curl exiting contains the
> following...
>
> <= Recv header, 23 bytes (0x17)
> 0000: HTTP/1.1 202 Accepted
> <= Recv header, 37 bytes (0x25)
> 0000: Date: Wed, 06 Oct 2004 11:29:01 GMT
> <= Recv header, 16 bytes (0x10)
> 0000: Server: Apache
> <= Recv header, 118 bytes (0x76)
> 0000: set-cookie: exn-auth-main=703062991; path=/; domain=.amazon.co.u
> 0040: k; expires=Wednesday, 06-Oct-04 15:59:02 GMT; secure
> <= Recv header, 20 bytes (0x14)
> 0000: Content-Length: 26
> <= Recv header, 19 bytes (0x13)
> 0000: nnCoection: close

Is this really what the server sent? "nnCoection:" ?

> At the bottom of the trace, in the cases where curl doesn't exit

How long do you wait before you say it "doesn't exit" ? Are all the headers
the same for the working and the non-working cases?

> the file is still transmitted in it's entirety, but some or all of these
> lines are missing.

Some or all what lines? Headers? If so, what are the differences?

-- 
      Daniel Stenberg -- http://curl.haxx.se -- http://daniel.haxx.se
       Dedicated custom curl help for hire: http://haxx.se/curl.html
Received on 2004-10-06