msg145157 - (view) |
Author: Matt Spear (Matt.Spear) |
Date: 2011-10-08 05:11 |
httplib with a debuglevel prints out the response headers, but does not do so with CONNECT requests (when set_tunnel is used). Attached is a small patch to print the reply when the CONNECT request returns something other than 200 OK. I'm not sure if it is worth printing the headers when a 200 OK is given. If it seems useful I can update the patch. Thanks!!! |
|
|
msg221913 - (view) |
Author: Mark Lawrence (BreamoreBoy) * |
Date: 2014-06-29 22:55 |
The httplib module has been renamed to http.client in Python 3, besides which the attached patch isn't in the standard format that is used here. |
|
|
msg223618 - (view) |
Author: Demian Brecht (demian.brecht) *  |
Date: 2014-07-21 23:34 |
Attached a simple fix to the problem as written, matching logging method of HTTPResponse.begin(). |
|
|
msg233563 - (view) |
Author: Demian Brecht (demian.brecht) *  |
Date: 2015-01-07 06:21 |
Just happened to come across this now. Updated patch with test. |
|
|
msg234859 - (view) |
Author: Demian Brecht (demian.brecht) *  |
Date: 2015-01-27 22:45 |
Ping. |
|
|
msg234861 - (view) |
Author: Berker Peksag (berker.peksag) *  |
Date: 2015-01-27 22:58 |
Thanks for the patch! Could you revert unrelated changes (whitespaces, PEP 8 etc.) if you have time? |
|
|
msg234862 - (view) |
Author: Demian Brecht (demian.brecht) *  |
Date: 2015-01-27 23:10 |
Sure, I should have some time later today to do so. Should such changes not be made as they're encountered in order to clean up the older code that isn't up to spec? Or should they only be made as the code is modified? On 2015-01-27 2:58 PM, Berker Peksag wrote: > > Berker Peksag added the comment: > > Thanks for the patch! Could you revert unrelated changes (whitespaces, PEP 8 etc.) if you have time? > > ---------- > stage: patch review -> commit review > > _______________________________________ > Python tracker <report@bugs.python.org> > <http://bugs.python.org/issue13128> > _______________________________________ > |
|
|
msg234897 - (view) |
Author: Demian Brecht (demian.brecht) *  |
Date: 2015-01-28 15:25 |
New patch removes unrelated changes. |
|
|
msg235333 - (view) |
Author: Roundup Robot (python-dev)  |
Date: 2015-02-03 10:22 |
New changeset dfbd07cdc031 by Berker Peksag in branch 'default': Issue #13128: Print response headers for CONNECT requests when debuglevel > 0. https://hg.python.org/cpython/rev/dfbd07cdc031 |
|
|
msg235334 - (view) |
Author: Berker Peksag (berker.peksag) *  |
Date: 2015-02-03 10:25 |
Thanks for the patch, Demian. I've simplified the test code a bit and committed it. Also, thanks for the report and for the initial patch Matt. |
|
|