cURL / Mailing Lists / curl-users / Single Mail

curl-users

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

From: Luigi Grilli <luigi.grilli_at_elmo.it>
Date: Tue, 8 May 2007 17:44:28 +0200

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 had to modify this files:
- /src/main.c
- /lib/urldata.h
- /lib/transfer.c
- /lib/url.c
- /include/curl.h

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.

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?

Thanks for you help.
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 15.39
A: the curl tool
Oggetto: Re: R: Curl exit when reply doesn't contain content-length

On Tue, 8 May 2007, Luigi Grilli wrote:

> I forgot to mention that Firefox can handle correctly this situation. And
> also the proxy(squid) itself.

I know, others have mentioned this as well but without suggested heuristics on
how we want libcurl to behave that's not much help to know that other
softwares deal with it differently.

> If the default behaviour is to consider the server persistent why not have a
> option (like --close) to let the curl/libcurl user decide the default. So
> having this option will send the "Connection: close" header and will expect
> the server to close the connection (even if it doesn't send the same header)
> so the library will receive the body until the server closes the connection.

Yes, sure, we could have an option that for this case when there's no headers
it would assume a "Connection: close" header.

Personally, I'm off for a week's vacation now so nothing more will happen from
me for a while. This should be fairly easy for someone else to add an option
and patch for though.

-- 
  Commercial curl and libcurl Technical Support: http://haxx.se/curl.html
Received on 2007-05-08