cURL / Mailing Lists / curl-users / Single Mail

curl-users

Re: Crashes with multithreaded libcurl and SSL redirects

From: Job 317 <job317_at_mailvault.com>
Date: Wed Jul 16 21:07:58 2008

This is a MIME encoded message.

--=_532807cb6b7dbf9435267eca3039fc27
Content-Type: text/plain
Content-Transfer-Encoding: 7bit

On 16-Jul-2008 19:08:18 +0200, you wrote:
> On Wed, Jul 16, 2008 at 04:01:00PM +0000, Job 317 wrote:
> > I have a multithreaded app using libcurl. Occasionally I ge a link
that
> > redirects to an SSL/https link. This, of course, causes problems
because
> > the app currently is not built with multi-threaded openssl support
which
> > is what I'm working to solve.
> >
> > My question, since the URL(s) don't start off being https:// in
most
> > cases, host do I effectively use libcurl to properly handle SSL
> > redirects without crashing due to the mishandling of SSL in my
case?
> >
> > Note: I need to support redirects so I have the following settings
for
> > this currently:
> >
> > curl_easy_setopt (curl, CURLOPT_MAXREDIRS, (long)5);
> > curl_easy_setopt (curl, CURLOPT_FOLLOWLOCATION, TRUE);
> >
> > Opinions would be appreciated.
>
> You could also disable automatic redirect handling and do it manually
within
> the app, disallowing any redirects to SSL-based protocols. Or simply
> recompile your libcurl without SSL support.

This all defeats the purpose of the application. I need to support
redirects and I need to support SSL.

My question was regarding how to properly use the curl APIs for a URL
that is http:// which later gets redirected to a https:// connection.
This problem has been causing random crashes. What I'm trying to solve
it the best way to handle this situation in a multi-threaded
environment.
--=_532807cb6b7dbf9435267eca3039fc27
Content-Type: text/plain; charset="us-ascii"
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
Content-Disposition: inline

-------------------------------------------------------------------
List admin: http://cool.haxx.se/cgi-bin/mailman/listinfo/curl-users
FAQ: http://curl.haxx.se/docs/faq.html
Etiquette: http://curl.haxx.se/mail/etiquette.html

--=_532807cb6b7dbf9435267eca3039fc27--
Received on 2008-07-16