httplib and HTTPS Connections

runningwild sparkytwobillion at gmail.com
Mon Oct 16 22:45:17 EDT 2006


runningwild wrote:
> Helo,
>
> This is the first time I have cared about httplib's HTTPSConnection.
>
> In the docs I read "Note: HTTPS support is only available if the socket
> module was compiled with SSL support."
>
> Although my small test script "seems" to work when connecting to a
> webserver via HTTPS I am really not sure.
>
> In other words it worked the first time. I never trust anything that
> seems to work right the first time. ;-)
>
> My question is how can I tell if the criteria in the "NOTE:" is met?
> How do I know that the socket module was indeed compled with SSL
> support?
>
> The reason this is important is that I am building a credit card
> payment system.
>
> Here is my little test script
> ========================
> Python 2.4.3
>
> import httplib
> conn = httplib.HTTPSConnection('**********')
> conn.request('GET' '/index.html')
> resp = conn.getresponse()
>
> page = resp.read()
> print page

Quick followup:

I just got off the phone with my sys admin. Python was compiled with
the ssl flag turned on.
ssl does work other applications.

I am assuming we are covered. I just want to be sure.




More information about the Python-list mailing list