cURL / Mailing Lists / curl-library / Single Mail


Re: Problem with HTTP PUT

From: Cris Bailiff <>
Date: Tue, 25 Sep 2001 16:14:59 +1000

I've been testing various uploads (http post & put, ftp put) with
libcurl 7.8.1 through the perl interface a number of times recently, and
haven't had any problems getting the read function to callback.

I haven't checked the libcurl source, but are you sure that 'helper' is
!= NULL? The behaviour of callbacks changed slightly in this area,
although it actually became 'more permissive' rather than less...

Sorry I can't be more help...


Daniel Stenberg wrote:
> On Mon, 24 Sep 2001, Jon Travis wrote:
> [This is a libcurl issue, I cc this reply to the libcurl list, please do that
> too.]
> > Having a problem with HTTP PUT's with libcurl 7.8.1. I'm setting the
> > following values:
> >
> > curl_easy_setopt(transport->curl, CURLOPT_UPLOAD, 1);
> > curl_easy_setopt(transport->curl, CURLOPT_PUT, 1);
> > curl_easy_setopt(transport->curl, CURLOPT_INFILESIZE, put_len);
> > curl_easy_setopt(transport->curl, CURLOPT_INFILE, helper);
> > curl_easy_setopt(transport->curl, CURLOPT_READFUNCTION, stream_read);
> >
> > When I pull it into the proxy, all the headers are sent, and the correct
> > Content-Length is sent, but the stream_read function is never called, and
> > libcurl simply sits, waiting for data from the web server. Is this a
> > known bug? It seems as though PUTs used to work.
> Can you HTTP PUT with the command line tool?
> I hacked up a quick HTTP PUT example code to try almost exactly your program
> and my read callback was called properly. I tried it against my test perl
> server so I also verified that the PUT data passed to the server looked good.
> You mention a proxy there. Does that interfere with this somehow?
> My HTTP PUT test code was just added to the docs/example directory and can be
> viewed here:
> --
> Daniel Stenberg -- curl groks URLs --
Received on 2001-09-25