[PATCH] do not replace the request header names with lower case
Mads Kiilerich
mads at kiilerich.com
Thu May 22 12:52:24 CDT 2014
On 05/22/2014 12:27 PM, domruf wrote:
> # HG changeset patch
> # User domruf <dominikruf at gmail.com>
> # Date 1400699187 -7200
> # Wed May 21 21:06:27 2014 +0200
> # Branch stable
> # Node ID afc72aa3019ecd07f947ccfb8dca6ae20ada06dd
> # Parent 54d7657d7d1e6a62315eea53f4498657e766bb60
> do not replace the request header names with lower case
>
> If a webserver expects a header in a certain case the request might fail.
> i.e. if a (not so well writen) authentication module only accepts
> "Authorization" and fails with "authorization"
The standards are very clear: the header names are case insensitive.
This patch adds a bit to code size and readability and execution time
and doesn't really make Mercurial "better". I do not see a compelling
reason why we should want it ... unless you can convince us that the
potential issue you mention is so common that it is a de facto standard.
/Mads
More information about the Mercurial-devel
mailing list