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

  • Thread starter Benjamin Schollnick
  • Start date
B

Benjamin Schollnick

Folks,

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':
'http://www.wb.xerox.com:8000',
'https':
'http://www.wb.xerox.com:8000'})

request =
urllib2.Request(url="https://www.docushare.xerox.com")#+server_url)
request.set_proxy( "www.wb.xerox.com:8000", "https")


stream = urllib2.urlopen( request )

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

sys.exit(5)

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?

C:\develope\docushare>python
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.<function ssl at 0x00BC95B0>

Anyone have any suggestions?

- Ben
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,821
Latest member
AleidaSchi

Latest Threads

Top