cURL / Mailing Lists / curl-users / Single Mail

curl-users

R: R: R: Curl exit when reply doesn't contain content-length

From: Luigi Grilli <luigi.grilli_at_elmo.it>
Date: Wed, 9 May 2007 09:04:26 +0200

Ok now I will subscribe also to the other list. Anyway jut to keep everything in one place I post the patch here.
I really don't know well how to post it so here is a tar containing 5 diff files.

About our discussion I was thinking that another way could be for curl to wait a (settable) timeout before considering empty the reply, maybe with a default of 5 seconds. If in this 5 seconds no data has been received and the server didn't close the connection consider the reply empty and exit. If we receive data in this 5 seconds wait for server to close the connection.

I don't like the name too but... it's the first thing that came in my mind.

Thanks
Luigi

-----Messaggio originale-----
Da: curl-users-bounces_at_cool.haxx.se [mailto:curl-users-bounces_at_cool.haxx.se] Per conto di Daniel Stenberg
Inviato: marted́ 8 maggio 2007 22.14
A: the curl tool
Oggetto: Re: R: R: Curl exit when reply doesn't contain content-length

On Tue, 8 May 2007, Luigi Grilli wrote:

BTW, it struck me that you could try enforcing HTTP 1.0 and possibly you could
get away without changes.

> I took a look at the code and if at the beginning seemed to be really hard
> it has not been so much difficult. I had a --forceclose option to curl and a
> CURLOPT_HTTP_FORCE_CLOSE option for the libcurl.

I'm not sure I like the name, but that's a very minor detail...

> Tomorrow I will post the patch. If someone can tell me if this list is ok to
> post patches or point me to the right place it would be great.

Posting here is okay when we discuss curl the tool. More dedicated development
and libcurl stuff is otherwise kept on the curl-library list.

> Anwyay now when I compile (I use mingw32) I don't get the usual libcurl.dll
> and libcurl.lib but I get a libcurl-4.dll that is double in size and no
> libcurl.lib. What I am missing?

Perhaps because the .dll file isn't stripped? You can generate a .lib file
using dlltool.

But for further windows-related stuff I'm really not the man to ask.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html

Received on 2007-05-09