New submission from Attila Gerendi:

In http.client.HTTPConnection's send(data) method if data has attribute read 
after is handled correctly as file-like object and sent out successfully the 
code continues to what should be an else branch (~line 858) and tries to send 
out again the data. This is harmless in most situations but only by chance and 
also run's unnecessary code.

I propose either to use an else branch for the code after line 858 or simply 
instead break return at line 853.

Cheers,
Sanyi

----------
components: Library (Lib)
messages: 179429
nosy: sanyi
priority: normal
severity: normal
status: open
title: Avoid unnecessary and possibly unsafe code from 
http.client.HTTPConnection.send
type: performance
versions: Python 3.1, Python 3.2, Python 3.3

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

Reply via email to