urllib2: HTTP Version not supported

Discussion in 'Python' started by Nirnimesh, Nov 2, 2006.

  1. Nirnimesh

    Nirnimesh Guest

    I'm using urllib2 module to fetch a URL from a server which understands
    HTTP/1.1 only (no HTTP/1.0).

    urllib2.urlopen() results in "urllib2.HTTPError: HTTP Error 505: HTTP
    Version not supported".

    How do I force urllib2 to use HTTP v1.1?

    Regards,
    Nirnimesh
     
    Nirnimesh, Nov 2, 2006
    #1
    1. Advertising

  2. Nirnimesh

    Tim Roberts Guest

    "Nirnimesh" <> wrote:
    >
    >I'm using urllib2 module to fetch a URL from a server which understands
    >HTTP/1.1 only (no HTTP/1.0).
    >
    >urllib2.urlopen() results in "urllib2.HTTPError: HTTP Error 505: HTTP
    >Version not supported".
    >
    >How do I force urllib2 to use HTTP v1.1?


    Are you passing httplib.HTTPConnection as the connection handler? If you
    use httplib.HTTP instead, it should create a 1.0 request.
    --
    Tim Roberts,
    Providenza & Boekelheide, Inc.
     
    Tim Roberts, Nov 3, 2006
    #2
    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. bruce barker
    Replies:
    0
    Views:
    2,359
    bruce barker
    Aug 2, 2004
  2. Josef Cihal
    Replies:
    0
    Views:
    767
    Josef Cihal
    Sep 5, 2005
  3. V Green
    Replies:
    0
    Views:
    865
    V Green
    Feb 5, 2008
  4. PA Bear [MS MVP]
    Replies:
    0
    Views:
    975
    PA Bear [MS MVP]
    Feb 5, 2008
  5. MA

    HTTP Version Not Supported

    MA, Mar 21, 2005, in forum: ASP .Net Web Services
    Replies:
    2
    Views:
    417
Loading...

Share This Page