cURL / Mailing Lists / curl-library / Single Mail

curl-library

Question about non-standard end of http response line

From: hui <lixiaohui9219_at_126.com>
Date: Fri, 2 Mar 2012 11:52:00 +0800

Hi,
The server used by many routers as multicast to http proxy, and http response header line end with "\n".In this case,CURL can't understand the server response. But if http response header line end with "\r\n",CURL can work!

What can I do?
Thanks!

----- Original Message -----
From: <curl-library-request_at_cool.haxx.se>
To: <curl-library_at_cool.haxx.se>
Sent: Thursday, March 01, 2012 7:00 PM
Subject: curl-library Digest, Vol 79, Issue 1

> Send curl-library mailing list submissions to
> curl-library_at_cool.haxx.se
>
> To subscribe or unsubscribe via the World Wide Web, visit
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-library
> or, via email, send a message with subject or body 'help' to
> curl-library-request_at_cool.haxx.se
>
> You can reach the person managing the list at
> curl-library-owner_at_cool.haxx.se
>
> When replying, please edit your Subject line so it is more specific
> than "Re: Contents of curl-library digest..."
>
>
> Today's Topics:
>
> 1. Proposed fix for OpenSSL memory leaks. (????????? ???????)
> 2. Require help in defining crypto lock callbacks.. (sukanya c)
>
>
> ----------------------------------------------------------------------
>
> Message: 1
> Date: Wed, 29 Feb 2012 13:12:01 +0200
> From: ????????? ??????? <kyselgov_at_gmail.com>
> To: curl-library_at_cool.haxx.se
> Subject: Proposed fix for OpenSSL memory leaks.
> Message-ID:
> <CADntnhMhh7JH4T+i0F97zK94FkxO_nvNDdiQo8Xjio4oDrBg4w_at_mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> Current version of cURL lib compiled with OpenSSL( + zlib) have some
> memory leaks in multi-thread scenario.
>
> The first mem leak - incorrect OpenSLL cleaning in easy interface
> (function curl_easy_cleanup()). The old versions of cURL (in
> curl_easy_cleanup()) had call of ERR_remove_??? OpenSSL method. For
> single-theraded app this mem pool will be cleaned in
> curl_global_cleanup(), but multi-thread app have memore leaks. I
> propose such fix for multithreading:
>
> /*
> * curl_easy_cleanup_multithreads() is the external interface to
> cleaning/freeing the given
> * easy handle.
> *
> * This is fixed replace for curl_easy_cleanup(). The
> curl_easy_cleanup() contains incorrect
> * code for multithread usage of libcurl with OpenSSL.
> * It does not contains code for local thread ERR table cleaning.
> */
> void curl_easy_cleanup_multithreads(CURL *curl)
> {
> curl_easy_cleanup(curl);
>
> /* If SSLeay exists */
> #if defined(USE_SSLEAY)
> /* Free thread local error state, destroying hash upon zero refcount */
> #ifdef HAVE_ERR_REMOVE_THREAD_STATE
> ERR_remove_thread_state(NULL);
> #else
> ERR_remove_state(0);
> #endif
> #endif
> }
>
>
> Second mem leak. OpenSSL 1.0.0 have mem stack for compression
> algorithms - ssl_comp_methods (file ssl_chip.c), but never free it! We
> can do such cleaning in curl_global_cleanup(), for example:
>
> void curl_global_cleanup_multithreads(void)
> {
> if(!initialized)
> return;
>
> if(--initialized)
> return;
>
> curl_global_cleanup();
>
> #if defined(USE_SSLEAY)
> CRYPTO_w_lock(CRYPTO_LOCK_SSL);
> sk_SSL_COMP_pop_free( SSL_COMP_get_compression_methods(), CRYPTO_free );
> CRYPTO_w_unlock(CRYPTO_LOCK_SSL);
> #endif
> }
>
>
> With best regards, Kyselgov E.N.
>
>
> ------------------------------
>
> Message: 2
> Date: Wed, 29 Feb 2012 23:44:20 +0530
> From: sukanya c <sukanya.mc_at_gmail.com>
> To: curl-library_at_cool.haxx.se
> Subject: Require help in defining crypto lock callbacks..
> Message-ID:
> <CADmCNsYSKu=V_=vAKq4xKrnTaNqyCZ1usoQTajZuH_-rSv=yNg_at_mail.gmail.com>
> Content-Type: text/plain; charset=ISO-8859-1
>
> I work for activesync application that use libcurl for client HTTPS operations.
>
> I faced a crash in crypto library function, SHA1_Update() which is
> used by libcurl.
>
> After googling, I understood that locking callbacks has to defined in my code.
>
> In my application, multiple threads are created and each thread use
> different curl session and do curl easy perform for data transfer.
>
> I want to know whether the locking function has to be defined before
> creating each session/thread or is it sufficient to define once for my
> program before libcurl loads.
>
> Please provide your suggestions.
>
> Thanks
> Sukanya
>
>
> ------------------------------
>
> _______________________________________________
> curl-library mailing list
> curl-library_at_cool.haxx.se
> http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-library
>
>
> End of curl-library Digest, Vol 79, Issue 1
> *******************************************

-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
Received on 2012-03-02