Capitalization of Content-* headers

From: Date: Thu, 17 Mar 2022 18:03:56 +0000
Subject: Capitalization of Content-* headers
Groups: php.internals 
Request: Send a blank email to internals+get-117361@lists.php.net to get a copy of this message
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

« previous php.internals (#117361) next »