Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:117361 Return-Path: Delivered-To: mailing list internals@lists.php.net Received: (qmail 74776 invoked from network); 17 Mar 2022 16:38:44 -0000 Received: from unknown (HELO php-smtp4.php.net) (45.112.84.5) by pb1.pair.com with SMTP; 17 Mar 2022 16:38:44 -0000 Received: from php-smtp4.php.net (localhost [127.0.0.1]) by php-smtp4.php.net (Postfix) with ESMTP id 559F1180543 for ; Thu, 17 Mar 2022 11:04:00 -0700 (PDT) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on php-smtp4.php.net X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=BAYES_05,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,SPF_HELO_NONE,SPF_PASS, T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.2 X-Spam-ASN: AS12876 51.158.128.0/17 X-Spam-Virus: No X-Envelope-From: Received: from ares.miletic.net (ares.miletic.net [51.158.166.73]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange ECDHE (P-256) server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by php-smtp4.php.net (Postfix) with ESMTPS for ; Thu, 17 Mar 2022 11:03:59 -0700 (PDT) Message-ID: <8546c37a-c75b-8130-819b-dcd86df4fbd8@miletic.net> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=miletic.net; s=mail; t=1647540238; bh=oUsTKy8uOK/1fnde7FVHEICU0/EsaoFKw/jPvd24I5A=; h=To:From:Subject; b=LY7a40kAy7/hXlXaXrgWTC7IEwQwjk60pS8GjGvqo9I/wV+YvYj5vWaXpBcAJVYf0 Iz8GNu8TRnXNvqNkHRgF0/qZxq3iTJYm/DLEk0cuiZAHDbOGjzWdqFlpKvE+QW/yo2 NZyU5he5HEjVJtXJ9fcoDL3PCrdI+YZQmwVV0qXI7t9h3Y2zUiSx6IyBrL+jx7f8d7 RM8KfcfB0yxHDnN7S6eloz4RL2xtyX4u+6Zb/hx6h00qCIodnWv4b9voK/T7Bk6x9V 8Fx9G4fvQeFCOFBlq1rucQP7KzHcqrPJn96qLgz5LQZAbDi52CiN1xNRRu68d6Ny8R O6c80fjjdRvY18qnNg7WYfYmmZcWe9SHec5pc8JVuLiQPBBT/xMr1PepPmzzeh1xRR vw4YHoKZyaSfPvufgegrBGUd+y68t69nKqZYXKd667oeTDg36w1xcwkeJp6D0JDgX0 oZy4e5ogiJwLaY7JoM47EsvAgoieBG05+UdtJYh+yUCnHITCK1ICdTCz+9dDtNyu6s 1wwAYXW268oYMDKORgTGPBV88zFXo3+fVeC7V/NIMqEzDjD3MCsXdk5MGXlbRDwZQP kprkYrXtEbnmvM2T2ER6dD6qbcQNt66uC2BXYuuySkvKr4FW0A4qG51I5Xx+IIUeC3 Akn0hwevKa1hJVdOfT13nPIY= Date: Thu, 17 Mar 2022 19:03:56 +0100 Mime-Version: 1.0 To: PHP internals Content-Language: en-US Reply-To: =?UTF-8?Q?Vedran_Mileti=c4=87?= Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Subject: Capitalization of Content-* headers From: internals@lists.php.net ("Vedran Miletić via internals") 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