Skip to content

Commit

Permalink
Clarify response header capitalisation
Browse files Browse the repository at this point in the history
We don't actually REQUIRE lowercase, it's just a nice convention to have. Some rare clients do, actually, care about case, so carve out a best-effort channel for that.
  • Loading branch information
andrewgodwin authored Mar 23, 2021
1 parent b3257f6 commit c1d3d97
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion specs/www.rst
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,8 @@ The *connection scope* information passed in ``scope`` contains:
``value`` is the header value. Order of header values must be preserved from
the original HTTP request; order of header names is not important. Duplicates
are possible and must be preserved in the message as received. Header names
must be lowercased. Pseudo headers (present in HTTP/2 and HTTP/3) must be
should be lowercased, but it is not required; servers should preserve header case
on a best-effort basis. Pseudo headers (present in HTTP/2 and HTTP/3) must be
removed; if ``:authority`` is present its value must be added to the start of
the iterable with ``host`` as the header name or replace any existing host
header already present.
Expand Down

4 comments on commit c1d3d97

@myers
Copy link

@myers myers commented on c1d3d97 Mar 23, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@andrewgodwin there are other places "Header names must be lowercased." appear in this document. Should they also be changed like you did for this first instance?

@andrewgodwin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I forgot that was all duplicated in the second section. Fixed.

@tomchristie
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is there some background on this change?

I'm don't have a "for-or-against" but it'd be helpful to understand the intent, since "Header names should be lowercased [...] servers should preserve header case" is a bit ambiguous to me.

@andrewgodwin
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have opened an issue on this for further discussion: #246

Please sign in to comment.