cvs: pear-core /PEAR REST.php

From: Date: Thu, 26 Mar 2009 23:12:46 +0000
Subject: cvs: pear-core /PEAR REST.php
Groups: php.pear.cvs php.pear.core 
Request: Send a blank email to pear-core+get-8285@lists.php.net to get a copy of this message
dufuz Thu Mar 26 23:12:46 2009 UTC Modified files: /pear-core/PEAR REST.php Log: Request #13150 Add support for following HTTP 302 redirects (add the final bit) http://cvs.php.net/viewvc.cgi/pear-core/PEAR/REST.php?r1=1.39&r2=1.40&diff_format=u Index: pear-core/PEAR/REST.php diff -u pear-core/PEAR/REST.php:1.39 pear-core/PEAR/REST.php:1.40 --- pear-core/PEAR/REST.php:1.39 Sun Mar 8 00:45:39 2009 +++ pear-core/PEAR/REST.php Thu Mar 26 23:12:46 2009 @@ -9,7 +9,7 @@ * @author Greg Beaver <cellog@php.net> * @copyright 1997-2009 The Authors * @license http://opensource.org/licenses/bsd-license.php New BSD License - * @version CVS: $Id: REST.php,v 1.39 2009/03/08 00:45:39 dufuz Exp $ + * @version CVS: $Id: REST.php,v 1.40 2009/03/26 23:12:46 dufuz Exp $ * @link http://pear.php.net/package/PEAR * @since File available since Release 1.4.0a1 */ @@ -126,6 +126,14 @@ switch ($headers['content-type']) { case 'text/xml' : case 'application/xml' : + case 'text/plain' : + if ($headers['content-type'] === 'text/plain') { + $check = substr($content, 0, 5); + if ($check !== '<?xml') { + break; + } + } + $parser = new PEAR_XMLParser; PEAR::pushErrorHandling(PEAR_ERROR_RETURN); $err = $parser->parse($content);

« previous php.pear.core (#8285) next »