Hello,

A while ago I observed that PHP's capitalization of Content-Type and Content-Length headers is Content-type and Content-length. This is working fine, but is inconsistent with the rest of the headers which are printed in Header-Name format.

I have proposed changing that [1] and concerns were raised about potential breakages that could happen. However, the HTTP standard (RFC 2616 - "Hypertext Transfer Protocol -- HTTP/1.1", section 4.2 "Message Headers") says that the headers should be parsed as case-insensitive so any eventual breakages could be considered as non-adherences to the standard and it might be a good chance to fix them.

What do you think about this change?

With best regards,
Vedran Miletić

[1] https://github.com/php/php-src/pull/7577
[2] https://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2

--
Vedran Miletić
vedran.miletic.net

--
PHP Internals - PHP Runtime Development Mailing List
To unsubscribe, visit: https://www.php.net/unsub.php

Reply via email to