John J Lee <[EMAIL PROTECTED]> added the comment:

> With respect to point 1), I assume that we all agree upon that headers
> should stored in Titled-Format instead of Capitalized-format. 

I would probably choose to store the headers in Capitalized-form,
because that makes implementing .headers trivial.

[...]
> Now, if we go for a Case Normalization at the much later stage, will the
> headers be stored still in capitalize() format? ( In that case, this bug
> requests it be stored in .titled() format confirming to many practices)
> Would you like to explain a bit more on that?

Implement .get_header() and friends using .headers, along the lines of:

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

And then ensure that the headers actually passed to httplib also get
.title()-cased.  This also has the benefit, compared with your patch, of
leaving the behaviour of non-HTTP URL schemes unchanged.

_______________________________________
Python tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue2275>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to