Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:53714 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 39874 invoked from network); 1 Jul 2011 00:55:24 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 1 Jul 2011 00:55:24 -0000 Authentication-Results: pb1.pair.com smtp.mail=sean@seancoates.com; spf=permerror; sender-id=unknown Authentication-Results: pb1.pair.com header.from=sean@seancoates.com; sender-id=unknown Received-SPF: error (pb1.pair.com: domain seancoates.com from 64.15.79.181 cause and error) X-PHP-List-Original-Sender: sean@seancoates.com X-Host-Fingerprint: 64.15.79.181 iconoclast.caedmon.net Received: from [64.15.79.181] ([64.15.79.181:51878] helo=iconoclast.caedmon.net) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id 92/25-04352-AFA1D0E4 for ; Thu, 30 Jun 2011 20:55:23 -0400 Received: from localhost (localhost [127.0.0.1]) by iconoclast.caedmon.net (Postfix) with ESMTP id 3999F784063; Thu, 30 Jun 2011 20:57:29 -0400 (EDT) X-Virus-Scanned: Debian amavisd-new at iconoclast.caedmon.net Received: from iconoclast.caedmon.net ([127.0.0.1]) by localhost (iconoclast.caedmon.net [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id IDJHxj2X6v8k; Thu, 30 Jun 2011 20:57:27 -0400 (EDT) Received: from [192.168.145.200] (modemcable050.248-178-173.mc.videotron.ca [173.178.248.50]) by iconoclast.caedmon.net (Postfix) with ESMTPSA id 1B5AB784057; Thu, 30 Jun 2011 20:57:27 -0400 (EDT) Mime-Version: 1.0 (Apple Message framework v1084) Content-Type: text/plain; charset=windows-1252 In-Reply-To: <4E0CE015.80503@no-surprises.co.uk> Date: Thu, 30 Jun 2011 20:55:17 -0400 Cc: PHP internals Content-Transfer-Encoding: quoted-printable Message-ID: <3D0839B3-5201-4D8C-9539-E4FBEC81C038@seancoates.com> References: <4E0CE015.80503@no-surprises.co.uk> To: Michael Maclean X-Mailer: Apple Mail (2.1084) Subject: Re: [PHP-DEV] Improvements to HTTP stream metadata From: sean@seancoates.com (Sean Coates) > * Add a 'response_code' key, with the server response code as an = integer > =85 > Anyone got any thoughts on this? I appreciate it'd be a BC break, but = I think it might be useful. While I applaud the idea of making this easier, keep in mind that a = single request can have multiple status code responses: string(18) "HTTP/1.1 302 Found" [8]=3D> string(15) "HTTP/1.1 200 OK" } There could also be a large number of "HTTP/1.1 100 Continue" headers in = there, or more 300 series redirects. Putting the headers into an associative array also has similar problems = (there can be many headers with the same name). This can, of course, be worked around, but it's not as simple as just = expecting a single response code from a HTTP stream request.=20 Aside, but related: most code I'd written prior to ~6 months ago, and = most of the example code I've seen does something like: list($prot, $status, $msg) =3D explode($m['wrapper_data'][0], 3); =85which is a nasty bug to track down. S