Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:79380 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 31395 invoked from network); 2 Dec 2014 11:04:52 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 2 Dec 2014 11:04:52 -0000 Authentication-Results: pb1.pair.com smtp.mail=rowan.collins@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=rowan.collins@gmail.com; sender-id=pass Received-SPF: pass (pb1.pair.com: domain gmail.com designates 74.125.82.46 as permitted sender) X-PHP-List-Original-Sender: rowan.collins@gmail.com X-Host-Fingerprint: 74.125.82.46 mail-wg0-f46.google.com Received: from [74.125.82.46] ([74.125.82.46:43017] helo=mail-wg0-f46.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id D2/CE-32869-3DC9D745 for ; Tue, 02 Dec 2014 06:04:52 -0500 Received: by mail-wg0-f46.google.com with SMTP id a1so8392659wgh.5 for ; Tue, 02 Dec 2014 03:04:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type; bh=aYo3Z2DZN0vAuYbRh35fpxYjMlE2jwNiDnb/XQG7p5U=; b=KHI2rzmI95zkOkeA4XlWa6TB0SHIIEp2QbJX7lQm5ctt9Ne3W8Xzx4hqajNhW4slkD 6PQYgWWafwjLUcCg36SNRC9wUnnMvVRIlP+ZWI4FjiGCH2hGZMRKCb6xeqrTzBnXontk lTPWPusOMH8/DXCLoQm+J0yuMiNjF05Hyj1SJVzsSyDQ6ujhpbjQZjPToj6DIoyRjFVk acrtSHfS/AxM/1eGSsWk6N936dNUCLRmk6KMhXlWJyJDjEjObqmRcXRpz7/qAVJQB1cF 6dLaNheTNw2WB5YXi/erdcKIBekFxIRO4WOvsu5Ejy1t+ee6h29kBdvUnrkDOAH1X3g/ HOLw== X-Received: by 10.194.23.202 with SMTP id o10mr1604151wjf.73.1417518288053; Tue, 02 Dec 2014 03:04:48 -0800 (PST) Received: from [192.168.0.148] ([62.189.198.114]) by mx.google.com with ESMTPSA id 4sm31440625wjs.24.2014.12.02.03.04.46 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Tue, 02 Dec 2014 03:04:47 -0800 (PST) Message-ID: <547D9CC1.3080207@gmail.com> Date: Tue, 02 Dec 2014 11:04:33 +0000 User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:31.0) Gecko/20100101 Thunderbird/31.2.0 MIME-Version: 1.0 To: PHP Internals List References: <547CEB74.9070807@ralphschindler.com> <214B0FB2-0C7A-4C38-9F46-9153DF0544A3@samplonius.org> In-Reply-To: <214B0FB2-0C7A-4C38-9F46-9153DF0544A3@samplonius.org> Content-Type: multipart/alternative; boundary="------------040801090903090004020704" Subject: Re: [PHP-DEV] $http_response_header From: rowan.collins@gmail.com (Rowan Collins) --------------040801090903090004020704 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 8bit Tom Samplonius wrote on 02/12/2014 05:01: >> >> Wow, I had no idea that existed; what an incredibly ugly >> implementation. Even the name is weird (why "header" singular when it >> contains an array of headers?) > > Actually, no. HTTP responses contain a single header at the > protocol level, but contain multiple lines. At some point, people > started to each line a “header”, which is actually more strange. I > think that usage may have originated in PHP, actually. At this point, > common usage supports both “header” and “headers”, though “header” is > the more general term. For comparison, no one refers to the separate > fields of a TCP header, as “headers”. I'm not sure the standards back you up on that, actually: RFC 2616 (the old HTTP/1.1 spec obsoleted earlier this year) says: > Request (section 5) and Response (section 6) messages use the generic message format of RFC 822 [9] for transferring entities > (the payload of the message). Both types of message consist of a start-line, zero or more header fields (also known as "headers"), > an empty line (i.e., a line with nothing preceding the CRLF) indicating the end of the header fields, and possibly a message-body. Searching for "header" in RFC 822 (dated 1982!), the first mention is this: > The syntax of several fields of the rigidly-formated > ("headers") section is defined in this specification; some of > these fields must be included in all messages. So it looks to me like "HTTP header" has always been a synonym for "HTTP header field" basically forever. The new RFC 7230 uses slightly different wording and references, but still takes "header" to mean "header field", not the whole section: > All HTTP/1.1 messages consist of a start-line followed by a sequence > of octets in a format similar to the Internet Message Format > [RFC5322]: zero or more header fields (collectively referred to as > the "headers" or the "header section"), an empty line indicating the > end of the header section, and an optional message body. -- Rowan Collins [IMSoP] --------------040801090903090004020704--