cvs: pear /HTTP_Request Request.php

From: Date: Mon, 06 Oct 2003 16:57:19 +0000
Subject: cvs: pear /HTTP_Request Request.php
Groups: php.pear.cvs 
Request: Send a blank email to pear-cvs+get-13434@lists.php.net to get a copy of this message
zyprexia Mon Oct 6 12:57:19 2003 EDT Modified files: /pear/HTTP_Request Request.php Log: Fix for (pear) bug #18 Some non RFC2616 compliant servers are also sending fully lowercased headers. Let's hope that there aren't http servers with a spelling problem ;-) Index: pear/HTTP_Request/Request.php diff -u pear/HTTP_Request/Request.php:1.24 pear/HTTP_Request/Request.php:1.25 --- pear/HTTP_Request/Request.php:1.24 Thu Jun 5 14:14:30 2003 +++ pear/HTTP_Request/Request.php Mon Oct 6 12:57:19 2003 @@ -32,7 +32,7 @@ // | Author: Richard Heyes <richard@phpguru.org> | // +-----------------------------------------------------------------------+ // -// $Id: Request.php,v 1.24 2003/06/05 18:14:30 chregu Exp $ +// $Id: Request.php,v 1.25 2003/10/06 16:57:19 zyprexia Exp $ // // HTTP_Request Class // @@ -493,14 +493,16 @@ } // Check for redirection + // Bugfix (PEAR) bug #18, 6 oct 2003 by Dave Mertens (headers are also stored lowercase, so we're gonna use them here) + // some non RFC2616 compliant servers (scripts) are returning lowercase headers ('location: xxx') if ( $this->_allowRedirects AND $this->_redirects <= $this->_maxRedirects AND $this->getResponseCode() > 300 AND $this->getResponseCode() < 399 - AND !empty($this->_response->_headers['Location'])) { + AND !empty($this->_response->_headers['location'])) { - $redirect = $this->_response->_headers['Location']; + $redirect = $this->_response->_headers['location']; // Absolute URL if (preg_match('/^https?:\/\//i', $redirect)) {

« previous php.pear.cvs (#13434) next »