cURL / Mailing Lists / curl-library / Single Mail

curl-library

Re: PyCurl SSL on Win32/HTTPGET boolean values in Python

From: Ray S <r_san8_at_yahoo.com>
Date: Thu, 23 Jan 2003 03:55:32 -0800 (PST)

Hi Daniel,

Thanks a lot for the prompt reply - your suggestion
was very helpful and I have now resolved my problem
with SSL on Win32.

I've now encountered another issue. I'm trying to
code a multi-step request session which involves
authentication over SSL using a POST request (with
cookies enabled) and then subsequent GET requests.

The problem that I am having with PyCurl is that, once
the first POST request in a session is sent, all the
subsequent requests seem also to be POST rather than
GET, and this is confusing the server.

I have looked through the documentation and found in
http://curl.haxx.se/libcurl/c/the-guide.html a section
describing this issue, which says:

* * *
"You force an easyhandle to back to GET by using the
CURLOPT_HTTPGET option:
    curl_easy_setopt(easyhandle, CURLOPT_HTTPGET,
TRUE);
 
 Just setting CURLOPT_POSTFIELDS to "" or NULL will
*not* stop libcurl from doing a POST. It will just
make it POST without any data to send!"
* * *

I have tried to apply the same logic in Python but am
running into trouble because of the absence of Boolean
values in Python. When I try to do
Curl.setopt(pycurl.HTTPGET, 1) in Python I get an
error because the method does not accept integers. I
have also tried this with 'TRUE' instead of 1 but
strings are also disallowed.

Can you, Kjetil Jacobsen or anyone else shed any
further light on this issue?

Many thanks for your help!

Ray.

--- Daniel Stenberg <daniel_at_haxx.se> wrote:
> On Wed, 22 Jan 2003, Ray S wrote:
>
> > File "<interactive input>", line 1, in ? error:
> (35, 'SSL:
> > error:14090086:SSL
> routines:SSL3_GET_SERVER_CERTIFICATE:certificate
> verify
> > failed')
>
> This error is an indication that you ought to read
> this document:
>
> http://curl.haxx.se/lxr/source/SSLCERTS
>
> It discusses plain libcurl options, but I figure you
> can pretty easily
> translate them to pycurl conditions!
>
> Good luck!
>
> --
> Daniel Stenberg -- curl, cURL, Curl, CURL. Groks
URLs.

__________________________________________________
Do you Yahoo!?
Yahoo! Mail Plus - Powerful. Affordable. Sign up now.
http://mailplus.yahoo.com

-------------------------------------------------------
This SF.NET email is sponsored by:
SourceForge Enterprise Edition + IBM + LinuxWorld = Something 2 See!
http://www.vasoftware.com
Received on 2003-01-23