[issue13684] httplib tunnel infinite loop

2012-04-17 Thread luzakiru

luzakiru  added the comment:

Although perhaps not optimal, the patch is consistent with the rest of the code 
and fixes the reasonably severe issue. Could this patch be applied in lieu of a 
better one that can come later?

--

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2012-04-19 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
assignee:  -> orsenthil

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2012-04-23 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 790ae45b52be by Senthil Kumaran in branch '2.7':
Fix for Issue13684 - httplib tunnel infinite loop
http://hg.python.org/cpython/rev/790ae45b52be

New changeset 7787a9aebdc6 by Senthil Kumaran in branch '3.2':
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
http://hg.python.org/cpython/rev/7787a9aebdc6

New changeset f98fb46ff273 by Senthil Kumaran in branch '2.7':
news for issue13684
http://hg.python.org/cpython/rev/f98fb46ff273

New changeset 26631c56d81f by Senthil Kumaran in branch '3.2':
news for issue13684
http://hg.python.org/cpython/rev/26631c56d81f

New changeset 1acb252a3858 by Senthil Kumaran in branch 'default':
3.2 - Fix for Issue13684 - httplib tunnel infinite loop
http://hg.python.org/cpython/rev/1acb252a3858

New changeset 246abd64e830 by Senthil Kumaran in branch 'default':
news for issue13684
http://hg.python.org/cpython/rev/246abd64e830

--
nosy: +python-dev

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



[issue13684] httplib tunnel infinite loop

2012-04-28 Thread Roundup Robot

Roundup Robot  added the comment:

New changeset 685c1db976c4 by Senthil Kumaran in branch '2.7':
httplib test for early eof response. related to Issue13684
http://hg.python.org/cpython/rev/685c1db976c4

New changeset afabb0635b15 by Senthil Kumaran in branch '3.2':
httplib test for early eof response. related to Issue13684
http://hg.python.org/cpython/rev/afabb0635b15

New changeset cfff6a53f4a3 by Senthil Kumaran in branch 'default':
httplib test for early eof response. related to Issue13684
http://hg.python.org/cpython/rev/cfff6a53f4a3

--

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2012-04-28 Thread Senthil Kumaran

Senthil Kumaran  added the comment:

I added a simple test for the early eof condition. It is not specific under 
_tunnel. I find that Mocks yet to be written that cover the response from 
httplib ( the mocks in the tests -httplib,urllib2), have their own overridden 
read() method which may not cover this scenario).  The early eof test may be 
helpful to some extent as general test case. I am closing this bug report as 
fix has been covered.

--
resolution:  -> fixed

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2011-12-30 Thread luzakiru

New submission from luzakiru :

readline() can return ''. This is handled in most places in httplib but not 
when a tunnel is used. It leads to a infinite loop that permanently blocks the 
program while wasting CPU cycles.

For the patch I simply copied the fix that is used elsewhere in the file where 
readline() is used. It can be fixed in the same way in 2.6.

--
components: Library (Lib)
files: httplib.patch
keywords: patch
messages: 150383
nosy: luzakiru
priority: normal
severity: normal
status: open
title: httplib tunnel infinite loop
type: crash
versions: Python 2.6, Python 2.7
Added file: http://bugs.python.org/file24113/httplib.patch

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2011-12-30 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
nosy: +orsenthil
stage:  -> patch review
versions: +Python 3.2, Python 3.3 -Python 2.6

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2011-12-30 Thread Terry J. Reedy

Terry J. Reedy  added the comment:

In 3.2, http.client.py, insertion would be at line 718.
However, only one statement is needed to break. 3.2 elsewhere has
if line in (b'\r\n', b'\n', b''):
break
But I note that at 512, there is the code luzakiru patched in. I think that 
should perhaps be changed to above also, unless bare \n from reading a server 
is really impossible.

At 313, i found this misformed code:

 if not line:
# Presumably, the server closed the connection before
# sending a valid response.
 raise BadStatusLine(line)

[I am curious -- is it really intended to simply throw away the tunnel server 
response after the first header?]

--
nosy: +terry.reedy

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2012-01-02 Thread Ross Lagerwall

Changes by Ross Lagerwall :


--
nosy: +rosslagerwall

___
Python tracker 

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



[issue13684] httplib tunnel infinite loop

2013-02-24 Thread Antoine Pitrou

Changes by Antoine Pitrou :


--
stage: patch review -> committed/rejected
status: open -> closed

___
Python tracker 

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