curl-library
Re: question on HTTP PUT with unknown data size
Date: Wed, 6 Nov 2002 15:47:39 -0500
Hmm, doing a little research would I be correct in assuming that the only
valid way for this to work is with a chunked put implementation?
RBramante_at_on.com
Sent by: To: curl-library_at_lists.sourceforge.net
curl-library-admin_at_lists.sour cc:
ceforge.net Subject: question on HTTP PUT with unknown data size
11/06/2002 12:53 PM
Please respond to
curl-library
I have several cases where the amount of data I am putting to the server is
from a compression stream so I do not know the total amount of data to be
written beforehand. In this case, I call curl_easy_setopt(curl_handle,
CURLOPT_INFILESIZE, 0) before the curl_easy_perform(). This does work,
however I notice a delay of approx 60 seconds between my
CURLOPT_READFUNCTION handler returning 0 to signal end-of-file to curl, and
the return of curl_easy_perform().
Obviously, when I set CURLOPT_INFILESIZE to a valid size when known there
is no such delay.
I tried to take a quick peek at Curl_readwrite() but admittedly got lost
stepping through it.
Any ideas of why the delay or shall I dig back into Curl_readwrite() and
have another look? I assumed the behavior of curl would be the same when
the handler returned 0 vs. reading up to a provided CURLOPT_INFILESIZE but
that doesn't seem to be the case. I guess the question is how does the
client signal the server of eof when there is no Content-Length? via
shutdown() on the socket?
P.S. This is with 7.9.8
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
-------------------------------------------------------
This sf.net email is sponsored by: See the NEW Palm
Tungsten T handheld. Power & Color in a compact size!
http://ads.sourceforge.net/cgi-bin/redirect.pl?palm0001en
Received on 2002-11-06