Christian Fertig added the comment:

ok, here's a run with debuglevel for the headers:

python 2.7 on openSuSE 11.4:

fertig@hornisse:/home/fertig > python
Python 2.7 (r27:82500, Aug 07 2010, 16:54:59) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> request = urllib2.Request('https://172.23.6.222')
>>> opener = urllib2.build_opener(urllib2.HTTPSHandler(debuglevel=111))
>>> feeddata = opener.open(request).read()
send: 'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 
172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Fri, 05 Oct 2012 09:46:33 GMT
header: Server: Virata-EmWeb/R6_2_0
header: Connection: close
header: Transfer-Encoding: chunked
header: Content-Type: text/html
header: Expires: Fri, 05 Oct 2012 09:46:33 GMT
header: Last-Modified: Fri, 05 Oct 2012 09:46:33 GMT
header: Cache-Control: no-cache
>>>

python 2.7.2 on openSuSE 12.1:

fertig@wespe:/home/fertig > python
Python 2.7.2 (default, Aug 19 2011, 20:41:43) [GCC] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import urllib2
>>> request = urllib2.Request('https://172.23.6.222')
>>> opener = urllib2.build_opener(urllib2.HTTPSHandler(debuglevel=111))
>>> feeddata = opener.open(request).read()
<urllib2.Request instance at 0x90d878>
send: 'GET / HTTP/1.1\r\nAccept-Encoding: identity\r\nHost: 
172.23.6.222\r\nConnection: close\r\nUser-Agent: Python-urllib/2.7\r\n\r\n'
reply: 'HTTP/1.1 405 Method Not Allowed\r\n'
header: Date: Fri, 05 Oct 2012 09:44:11 GMT
header: Server: Virata-EmWeb/R6_2_0
header: Connection: close
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib64/python2.7/urllib2.py", line 401, in open
    response = meth(req, response)
  File "/usr/lib64/python2.7/urllib2.py", line 514, in http_response
    'http', request, response, code, msg, hdrs)
  File "/usr/lib64/python2.7/urllib2.py", line 439, in error
    return self._call_chain(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 372, in _call_chain
    result = func(*args)
  File "/usr/lib64/python2.7/urllib2.py", line 522, in http_error_default
    raise HTTPError(req.get_full_url(), code, msg, hdrs, fp)
urllib2.HTTPError: HTTP Error 405: Method Not Allowed
>>>

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16109>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to