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.00073456473
Marked as misclassified No
Message-id <1218905238.61.0.13929794889.issue2756@psf.upfronthosting.co.za>
In-reply-to
Content
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(
        header_name,
        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
default.

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.
History
Date User Action Args
2008-08-16 16:47:18facundobatistasetrecipients: + facundobatista, orsenthil, zathras, BitTorment
2008-08-16 16:47:18facundobatistasetmessageid: <1218905238.61.0.13929794889.issue2756@psf.upfronthosting.co.za>
2008-08-16 16:47:17facundobatistalinkissue2756 messages
2008-08-16 16:47:17facundobatistacreate