[issue28570] httplib mishandles unknown 1XX status codes

2016-10-31 Thread Martin Panter
Martin Panter added the comment: Consuming and ignoring 1xx responses seems reasonable for general cases. Treating 101 (Switching Protocols) as a special case also seems reasonable. I also agree it would be good to provide an API to return these responses (at least after the request is complet

[issue28570] httplib mishandles unknown 1XX status codes

2016-10-31 Thread Cory Benfield
Cory Benfield added the comment: 101 should probably be special-cased, because in that case the underlying protocol is being totally changed. -- ___ Python tracker ___ _

[issue28570] httplib mishandles unknown 1XX status codes

2016-10-31 Thread SilentGhost
SilentGhost added the comment: The fix could be as small as the attached patched, though I'm not sure that is the correct way of handling 101 code. -- keywords: +patch nosy: +SilentGhost Added file: http://bugs.python.org/file45296/28570.diff ___ Pyt

[issue28570] httplib mishandles unknown 1XX status codes

2016-10-31 Thread Cory Benfield
New submission from Cory Benfield: Long story short http.client does not tolerate non-100 or 101 status codes from the 1XX block in a sensible manner: it treats them as final responses, rather than as provisional ones. Expected behaviour ~~ When http.client