Facundo Batista <[EMAIL PROTECTED]> added the comment: 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. Added file: http://bugs.python.org/file11126/issue2756-facundo.diff _______________________________________ Python tracker <[EMAIL PROTECTED]> <http://bugs.python.org/issue2756> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com