cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: POST a large file over HTTPS to IIS-5 problem

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 18 Dec 2002 10:45:39 +0100 (MET)

On Mon, 16 Dec 2002, Veselin Terzic wrote:

> curl 7.10.2 (i686-pc-linux-gnu) libcurl/7.10.2 OpenSSL/0.9.6g zlib/1.1.3

> I have tried to lower CURL_MAX_WRITE_SIZE to 10K and then to 1K, but that
> didn't make any difference, although it looks like SSL_write() was the
> issue.
>
> I've noticed 3 different behaviors:
>
> 1. file size 3.5K, no errors, i.e. I don't get any "Send header, 0 bytes"
> 2. file size 1 MB I get a lot of "Send header, 0 bytes" messages, but curl
> recovers and POSTs file successfully.

The reason for the "Send header, 0 bytes" message is when curl tries to send
data but it can't due to the socket being "full" and thus it loops and
retries again.

This "loop system" is severely brain-damaged as it doesn't wait for the
socket to become writable before trying again so it just tries and tries in a
senseless manner.

This approach has been changed since 7.10.2 and will be a lot smarter and
better in 7.10.3.

> 3. file size 6.6 MB I get the error below and file cannot be posted .

I does however not completely explain this though. The stupid send system
explains the many failed send attempts.

But, it is not unlikely that the server sends something back to the client
while the post is being done, and if curl doesn't receive that data it may
not like the situation and finally end it. I don't know if this is what
happens, but it's a theory.

> == Info: SSL_write() return error 5

Can you add 'errno' to that error message and rebuild (lib/send.c around line
240) ? The 5 mentioned above is the SSL error SSL_ERROR_SYSCALL and
supposedly, errno might contain some more details on this particular error
case.

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:
With Great Power, Comes Great Responsibility 
Learn to use your power at OSDN's High Performance Computing Channel
http://hpc.devchannel.org/
Received on 2002-12-18