cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: Odd Pause During HTTPS POST

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Wed, 5 Mar 2003 11:17:19 +0100 (CET)

On Tue, 4 Mar 2003, Seth Ladd wrote:

> I am running on Linux 2.4.20, libcurl 7.10.3 (tarball), and a custom app
> written in c/c++.

> When I POST two files in a row (thus using pipelining)

Just to make things clear: that will not use pipelining. libcurl does not
support pipelining. It will use a persistent (if possible) connection though.

> the first one succeeds, and the second one causes the fread call in
> transfer.c (~ line 144) to pause and never return.

Are you passing data to the program using stdin and the default read
functionality? Then this does not suprise me. By default, if you don't set
your own read callback (which most users of libcurl do) libcurl will read all
data from stdin.

When no more data comes it will consider the upload done. Of course, if you
then initiates a second transfer the stream of data on the stdin has stopped
and then libcurl will hang in the fread() waiting for more data to arrive.

> Sometimes, it segfaults.

That is puzzling however. Can you figure out more details on why and when
this happens?

Can you provide us a simple source code example that shows a stand-alone
program where this happens?

> Does any of this ring a bell? Does anyone have any tips or hints? I'm
> sure it's related to something silly I'm doing. I've tested the FILE
> handle to make sure it's not null before I give it to curl in
> curl_easy_setopt(curl, CURLOPT_READDATA, input).

Are you really gonna read the data from stdin for both uploads and how is it
supposed to recognize/know where the first transfer ends and the second one
begins?

-- 
 Daniel Stenberg -- curl, cURL, Curl, CURL. Groks URLs.
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
Received on 2003-03-05