Newsgroups: php.internals Path: news.php.net Xref: news.php.net php.internals:39321 Return-Path: Mailing-List: contact internals-help@lists.php.net; run by ezmlm Delivered-To: mailing list internals@lists.php.net Received: (qmail 87705 invoked from network); 25 Jul 2008 10:53:40 -0000 Received: from unknown (HELO lists.php.net) (127.0.0.1) by localhost with SMTP; 25 Jul 2008 10:53:40 -0000 Authentication-Results: pb1.pair.com smtp.mail=hannes.magnusson@gmail.com; spf=pass; sender-id=pass Authentication-Results: pb1.pair.com header.from=hannes.magnusson@gmail.com; sender-id=pass; domainkeys=bad Received-SPF: pass (pb1.pair.com: domain gmail.com designates 72.14.220.152 as permitted sender) DomainKey-Status: bad X-DomainKeys: Ecelerity dk_validate implementing draft-delany-domainkeys-base-01 X-PHP-List-Original-Sender: hannes.magnusson@gmail.com X-Host-Fingerprint: 72.14.220.152 fg-out-1718.google.com Received: from [72.14.220.152] ([72.14.220.152:25303] helo=fg-out-1718.google.com) by pb1.pair.com (ecelerity 2.1.1.9-wez r(12769M)) with ESMTP id F3/B6-22699-2B0B9884 for ; Fri, 25 Jul 2008 06:53:39 -0400 Received: by fg-out-1718.google.com with SMTP id 16so2132897fgg.23 for ; Fri, 25 Jul 2008 03:53:36 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from:to :subject:cc:in-reply-to:mime-version:content-type :content-transfer-encoding:content-disposition:references; bh=e+mpClkJJhoHYwDPYH/qp8MM4EEcB8PRDkfOjFbqN4k=; b=qfstYWgI6CsnI52YjmXC7gsPOmroWDB84XCe8Ok/cgstFm3srZDaY7plcM1Ql3XS0d FRau2oRPQH8h77xvz7wbL1AQ+OfxXYWeJRqHH0ohzHHmOTkSM1GdYM2xjBsRdxeew/ii gW9SRo7x4/7Lj+RnO7LuM9vEdc8KHesYRQgn4= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:to:subject:cc:in-reply-to:mime-version :content-type:content-transfer-encoding:content-disposition :references; b=n25i+KHh8qRnQp5QJQmi3XwOP7uM+ZWT6ldtbsYsV5O9I5cZe0SWWQydyaESvsHuzX yfoOUOiP21yFD0wjSb50JuheIAiVidSN5ivrd/lGjmEQFi66L0Re4KmwpMev2pURfwbt fmB86h7bABKYMqgW6XSi5JJBoSu4QgfHM1Zj8= Received: by 10.103.20.7 with SMTP id x7mr900974mui.75.1216983216077; Fri, 25 Jul 2008 03:53:36 -0700 (PDT) Received: by 10.103.248.20 with HTTP; Fri, 25 Jul 2008 03:53:36 -0700 (PDT) Message-ID: <7f3ed2c30807250353g6fb37d8kc6432634173427a6@mail.gmail.com> Date: Fri, 25 Jul 2008 12:53:36 +0200 To: "Noah Fontes" Cc: "=?ISO-8859-1?Q?David_Z=FClke?=" , internals@lists.php.net In-Reply-To: <48876D27.6030407@bitextender.com> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <4885E513.6080702@bitextender.com> <48864FA5.6050104@zend.com> <48876D27.6030407@bitextender.com> Subject: Re: [PHP-DEV] Patch for HTTP successful status codes From: hannes.magnusson@gmail.com ("Hannes Magnusson") On Wed, Jul 23, 2008 at 19:40, Noah Fontes wr= ote: > -----BEGIN PGP SIGNED MESSAGE----- > Hash: SHA1 > > David Z=FClke wrote: >> Yeah. We discussed that quite a while back when I sent over the >> "ignore_errors" options patch-like thing in November: >> http://thread.gmane.org/gmane.comp.php.devel/46003 >> >> I think we should do it. >> >> But what about other 3xx redirect codes? How are those handled? > > I think PHP implicitly follows any Location headers it can. That's > probably not the right behavior, but for an automated process it's not ba= d. > > I think that 3xx status codes, if they appear without a Location header, > should also probably not throw errors. They could provide valuable > information about the status of a page (particularly 304 Not Modified), > so I've updated the patch: > > http://cynigram.com/~nfontes/http_fopen_wrapper.patch > > BTW, any chance this could be rolled into 5.3? I think the BC break is > pretty non-notable, and it would be nice to stop throwing errors for > successful responses. I think changing all 3xx status codes to be success is a slightly more bc break then you think. A simple example: I do a file_get_contents() request. Store it in a local buffer. I do a second file_get_contents(), get a error (304) back, print out my buf= fer. Now, in 5.3.0 the 304 is treated as success so I naturally discard my buffer and print the results of the new request... Whooopsy, there was no data :( -Hannes