This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author orsenthil
Recipients Arfrever, antlong, djc, eric.araujo, joshual, kristjan.jonsson, lids, loewis, orsenthil, vstinner
Date 2010-12-07.07:22:23
SpamBayes Score 3.412598e-11
Marked as misclassified No
Message-id <1291706545.33.0.494819790735.issue8194@psf.upfronthosting.co.za>
In-reply-to
Content
Instead of tossing around the GzipDecoding code from one method to another (which would in turn change the return value from those methods), I thought is appropriate to do a change in parse_response itself, so that it verifies that it is a http response (new kind) before attempting header retrieval. If it an old kind of response (a file object), it does not do a getheader call.

This is committed in r87111 for release27-maint. I shall merge this into other branches.

This does not change any return value from the methods.

- Tests look bit more involved than I expected. The correct way to test this would be to create a FakeTransport object which exhibited the previous older behavior of getting the response via http.getfile method. 

The Fakesocket and Transport tests are not actually testing the response. So I could not exercise the "response part".(Perhaps this is reason it was not caught in the first place). The request part are exercised properly.

If someone has a patch for the tests to exercise response of Fakesocket object and Transport class tests, welcome. Otherwise I shall try to come up with one and add this case too.
History
Date User Action Args
2010-12-07 07:22:25orsenthilsetrecipients: + orsenthil, loewis, kristjan.jonsson, vstinner, djc, eric.araujo, Arfrever, lids, antlong, joshual
2010-12-07 07:22:25orsenthilsetmessageid: <1291706545.33.0.494819790735.issue8194@psf.upfronthosting.co.za>
2010-12-07 07:22:23orsenthillinkissue8194 messages
2010-12-07 07:22:23orsenthilcreate