classification
Title: Use title-case HTTP header fields
Type: enhancement Stage: resolved
Components: Library (Lib) Versions: Python 3.7
process
Status: closed Resolution: not a bug
Dependencies: Superseder:
Assigned To: Nosy List: brett.cannon, eric.araujo, ezio.melotti, maggyero, matrixise, mdk, ncoghlan, willingc
Priority: normal Keywords: patch

Created on 2019-02-18 22:33 by maggyero, last changed 2019-03-09 09:50 by mdk. This issue is now closed.

Pull Requests
URL Status Linked Edit
PR 11924 closed maggyero, 2019-02-18 22:34
Messages (5)
msg335870 - (view) Author: Géry (maggyero) * Date: 2019-02-18 22:33
Use consistent case for HTTP header fields, according to [RFC 7231](https://tools.ietf.org/html/rfc7231).
msg335908 - (view) Author: Stéphane Wirtel (matrixise) * (Python triager) Date: 2019-02-19 08:56
Thank you for your contribution and your issue, it's really appreciated. I had a doubt about this point and I wanted to verify about the HTTP headers.

But in the previous version of this RFC7230: https://www.w3.org/Protocols/rfc2616/rfc2616.html

Here is the section 4.2 "Message Headers" of this previous RFC: https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2
where you have "Field names are case-insensitive".

We can see the RFC2616 was replaced by multiple RFCs (7230-7237) and in the RFC 7230, there is a section 3.2 where there is the description of the header fields.

In the section 3.2 of RFC7230:

3.2. Header Fields
"
Each header field consists of a case-insensitive field name followed
by a colon (":"), optional leading whitespace, the field value, and
optional trailing whitespace.
"

https://tools.ietf.org/html/rfc7230#section-3.2

So in this case, it's case-insensitive.

I think we can close this issue and the associated Pull Request.

Have a nice day and thank you,
msg336147 - (view) Author: Brett Cannon (brett.cannon) * (Python committer) Date: 2019-02-20 20:15
As stated on the PR, changing the code isn't going to be worth it, but updating the docs would be nice.
msg336465 - (view) Author: Géry (maggyero) * Date: 2019-02-24 12:19
Please see the changes and my reply in the PR.
msg337567 - (view) Author: Julien Palard (mdk) * (Python committer) Date: 2019-03-09 09:50
Closing as "not a bug" as discussed in the PR.

Anyway thanks Géry for the work on this, even if not merged it's appreciated!
History
Date User Action Args
2019-03-09 09:50:28mdksetstatus: open -> closed
resolution: not a bug
messages: + msg337567

stage: patch review -> resolved
2019-02-24 12:19:50maggyerosetmessages: + msg336465
title: Use consistent case for HTTP header fields -> Use title-case HTTP header fields
2019-02-20 20:15:54brett.cannonsetmessages: + msg336147
2019-02-19 08:56:47matrixisesetnosy: + matrixise
messages: + msg335908
2019-02-18 22:34:44maggyerosetkeywords: + patch
stage: patch review
pull_requests: + pull_request11949
2019-02-18 22:33:30maggyerocreate