cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: easy API: curl_easy_perform() doesn't return after receiving all data

From: Daniel Stenberg <daniel_at_haxx.se>
Date: Tue, 7 Nov 2006 15:56:51 +0100 (CET)

On Mon, 6 Nov 2006, James Buchanan wrote:

> Attached is a little test program and the output it gives. Am I doing
> something wrong?

Well, I don't see why you pollute it with C++, it is grossly ineffective (like
new, strncpy(), append with string operator + and then delete - in every
callback) and you add a custom Content-Length: where you shouldn't need to,
but apart from that I couldn't spot any major flaw.

> CURL info: Connected to api.google.com (216.239.37.104) port 80 (#0)
>
> CURL HTTP Header Out: POST /search/beta2 HTTP/1.1
> Host: api.google.com
> Accept: */*
> Content-Type: text/xml; charset=utf-8
> Content-Length: 829
> SOAPAction: urn:GoogleSearchAction

As you can see, this is only the request-heders being sent. It should also
send 829 of request-body...

> CURL HTTP Header In: HTTP/1.1 200 OK
> CURL HTTP Header In: Content-Type: text/xml; charset=utf-8
> CURL HTTP Header In: Cache-control: private
> CURL HTTP Header In: Transfer-Encoding: chunked
> CURL HTTP Header In: Date: Mon, 06 Nov 2006 07:00:50 GMT
> CURL HTTP Header In: Server: GFE/1.3
>
> CURL info: select/poll returned error

Wow. This happens when Curl_select() returns only CSELECT_ERR and I've
actually never seen anyone experience this before.

I would suggest you run this with a debugger to investigate this deeper.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2006-11-07