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

Discussion in 'Python' started by Benjamin Schollnick, Apr 20, 2005.

  1. 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.
    >>> import socket
    >>> print socket.ssl

    <function ssl at 0x00BC95B0>

    Anyone have any suggestions?

    - Ben
    Benjamin Schollnick, Apr 20, 2005
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. christian_stengel
    Replies:
    0
    Views:
    2,593
    christian_stengel
    Jan 26, 2005
  2. Robert
    Replies:
    0
    Views:
    341
    Robert
    Apr 5, 2005
  3. Bloke
    Replies:
    1
    Views:
    696
    Paul Rubin
    May 19, 2005
  4. John Reese
    Replies:
    5
    Views:
    26,494
    John Reese
    Jul 17, 2005
  5. Robert
    Replies:
    0
    Views:
    1,463
    Robert
    Aug 31, 2005
Loading...

Share This Page