By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
454,509 Members | 1,745 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 454,509 IT Pros & Developers. It's quick & easy.

SSL via Proxy (URLLIB2) on Windows gives Unknown Protocol error?

P: n/a

With Windows XP, and Python v2.41 I am running into a problem....

The following code gives me an unknown protocol error.... And I am not
sure how
to resolve it...

I have a API written for DocuShare for a non-SSL server, and I wanted
to update it
to support the SSL/S3 login....

So here's the SSL test code, and I can't get the page to retrieve....

import urllib2
proxy_handler = urllib2.ProxyHandler({'http':

request =
request.set_proxy( "", "https")
stream = urllib2.urlopen( request )

print '\n'.join(stream.readlines())


The error is:

urllib2.URLError: <urlopen error (1, 'error:140770FC:SSL
routines:SSL23_GET_SERVER_HELLO:unknown protocol')>

As far as I can tell the Python 2.41 MSI bundle includes the SSL code?

Python 2.4.1 (#65, Mar 30 2005, 09:13:57) [MSC v.1310 32 bit (Intel)]
on win32
Type "help", "copyright", "credits" or "license" for more information.
import socket
print socket.ssl

<function ssl at 0x00BC95B0>

Anyone have any suggestions?

- Ben

Jul 19 '05 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.