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 facundobatista
Recipients BitTorment, facundobatista, orsenthil, zathras
Date 2008-08-16.16:47:16
SpamBayes Score 0.000734565
Marked as misclassified No
Message-id <>
What I think is that the AbstractHTTPHandler is grabbing the headers, in
the do_open() method, in an incorrect way.

Check the get_header() method from Request:

def get_header(self, header_name, default=None):
    return self.headers.get(
        self.unredirected_hdrs.get(header_name, default))

What it's doing there is to grab the header from self.header, and if not
there use the one in self.unredirected_hdrs, and if not there return the

So, to emulate this behaviour, in do_open() I just grabbed first the
unredirected headers, and then updated it with the normal ones.

See my simple patch I attach here, which solves the issue, and passes
all the tests also.
Date User Action Args
2008-08-16 16:47:18facundobatistasetrecipients: + facundobatista, orsenthil, zathras, BitTorment
2008-08-16 16:47:18facundobatistasetmessageid: <>
2008-08-16 16:47:17facundobatistalinkissue2756 messages
2008-08-16 16:47:17facundobatistacreate