[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-11-22 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

This bug is not reproducible in trunk, py3k and is not reproducible in
py26 releases too. I tried to hunt down if any changes in the code-line
from py2.5 to py2.6 had effect on the behavior mention (BadStatusLine) ,
but don't see any. 

I am closing this as works for me.

--
resolution:  -> works for me
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-01-19 Thread ak

New submission from ak :

https://www.orange.sk/ is served by an Oracle HTTPS server, and works
with firefox or opera but not urllib2.

code snippet:


import cookiejar
import urllib2

cookiejar = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar))
url = 'https://www.orange.sk/'
req = urllib2.Request(url, None)
s=opener.open(req)
 

Here's some output with debuglevel=1 :

>>> opener.open(urllib2.Request('http://www.orange.sk/', None, headers))

reply: 'HTTP/1.1 200 OK\r\n'
header: Date: Mon, 19 Jan 2009 21:44:03 GMT
header: Server: Oracle-Application-Server-10g/10.1.3.1.0 Oracle-HTTP-
Server
header: Set-Cookie:
JSESSIONID=0a19055a30d630c427bda71d4e26a37ca604b9f590dc.e3eNaNiRah4Pe3aSch8Sc3yOc40;
path=/web
header: Expires: Mon, 19 Jan 2009 21:44:13 GMT
header: Surrogate-Control: max-age="10"
header: Content-Type: text/html; charset=ISO-8859-2
header: X-Cache: MISS from www.orange.sk
header: Connection: close
header: Transfer-Encoding: chunked
>

>>> opener.open(urllib2.Request('https://www.orange.sk/', None, headers))

reply: ''
Traceback (most recent call last):
  File "", line 1, in 
  File "/usr/lib/python2.5/urllib2.py", line 381, in open
response = self._open(req, data)
  File "/usr/lib/python2.5/urllib2.py", line 399, in _open
'_open', req)
  File "/usr/lib/python2.5/urllib2.py", line 360, in _call_chain
result = func(*args)
  File "/usr/lib/python2.5/urllib2.py", line 1115, in https_open
return self.do_open(httplib.HTTPSConnection, req)
  File "/usr/lib/python2.5/urllib2.py", line 1080, in do_open
r = h.getresponse()
  File "/usr/lib/python2.5/httplib.py", line 928, in getresponse
response.begin()
  File "/usr/lib/python2.5/httplib.py", line 385, in begin
version, status, reason = self._read_status()
  File "/usr/lib/python2.5/httplib.py", line 349, in _read_status
raise BadStatusLine(line)
httplib.BadStatusLine 

As you can see the reply from the server seems empty (which results in
the BadStatusLine exception)

--
components: Library (Lib)
messages: 80224
nosy: ak
severity: normal
status: open
title: urllib2 HTTPS connection failure (BadStatusLine Exception)
type: behavior
versions: Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-02-12 Thread Daniel Diniz

Changes by Daniel Diniz :


--
nosy: +jjlee, orsenthil
stage:  -> test needed
versions: +Python 2.6 -Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-04-22 Thread Daniel Diniz

Daniel Diniz  added the comment:

Confirmed in 2.5, cannot confirm on trunk. Needs confirmation on 2.6 and
3.x.

--
keywords: +easy
nosy: +ajaksu2
priority:  -> normal
versions: +Python 3.0

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-08-22 Thread Shashank

Shashank  added the comment:

Works fine for me in 2.6 but fails as said by OP on 2.5.
(I came across this in the course of my work and am submitting a change
in a bug for the first time, pardon me if something is inappropriate :)

I used this modified codeblock:

--
import cookielib
import urllib2

cookiejar = cookielib.LWPCookieJar()
opener = urllib2.build_opener(urllib2.HTTPCookieProcessor(cookiejar))
url = 'https://www.orange.sk/'
req = urllib2.Request(url, None)
s=opener.open(req)
print s.read();

---

2.6 gives a complete HTML page but 2.5 raises httplib.BadStatusLine
exception.

--
nosy: +shashank

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue5007] urllib2 HTTPS connection failure (BadStatusLine Exception)

2009-08-22 Thread Senthil

Changes by Senthil :


--
assignee:  -> orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com