urllib2: HTTP Version not supported

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Nirnimesh

    #1

    urllib2: HTTP Version not supported

    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.HTTPEr ror: HTTP Error 505: HTTP
    Version not supported".

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

    Regards,
    Nirnimesh

  • Tim Roberts

    #2
    Re: urllib2: HTTP Version not supported

    "Nirnimesh" <nirnimesh@gmai l.comwrote:
    >
    >I'm using urllib2 module to fetch a URL from a server which understands
    >HTTP/1.1 only (no HTTP/1.0).
    >
    >urllib2.urlope n() results in "urllib2.HTTPEr ror: HTTP Error 505: HTTP
    >Version not supported".
    >
    >How do I force urllib2 to use HTTP v1.1?
    Are you passing httplib.HTTPCon nection as the connection handler? If you
    use httplib.HTTP instead, it should create a 1.0 request.
    --
    Tim Roberts, timr@probo.com
    Providenza & Boekelheide, Inc.

    Comment

    Working...