Package home | Report new bug | New search | Development Roadmap Status: Open | Feedback | All | Closed Since Version 0.9.0

Request #8527 Using locale 'de' does not work - HTTP Status 302 not supported
Submitted: 2006-08-21 17:30 UTC
From: openhaus at php dot net Assigned: ttsuruoka
Status: Closed Package: Services_Amazon (version 0.6.0)
PHP Version: 5.1.4 OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2006-08-21 17:30 UTC] openhaus at php dot net (Fabio Bacigalupo)
Description: ------------ IF I issue a simple request as shown in the field "test script" with the locale 'de' set, I get an error because the request is redirected on the server side but the PEAR script excepts the HTTP status code 200. // Retrieve the result and check that its HTTP 200 Ok. Otherwise raise // an error. if ($http->getResponseCode() != 200) { return PEAR::raiseError('Amazon return HTTP ' . $http->getResponseCode()); } line 774, Amazon.php Would be great if you could add more response codes. Thank you, Fabio. Test script: --------------- require_once 'Services/Amazon.php'; class PhpAmazon { private $amazon; function __construct() { $this->amazon = new Services_Amazon('XXX', 'php-dsaa', 'de'); } public function getAmazon() { return $this->amazon; } } $phpAmazon = new PhpAmazon(); $products = $phpAmazon->getAmazon()->searchKeyword('PHP'); if(!PEAR::isError($products)) { var_dump($products); } else { echo $products->message; } Expected result: ---------------- array(7) { [0]=> array(12) { ["url"]=> ... Actual result: -------------- Amazon return HTTP 302

Comments

 [2006-11-04 08:07 UTC] s dot newslists at googlemail dot com (Stefan Stolz)
I also was stoped by this bug. Are there any solutions until now? Look here: http://raa.ruby-lang.org/project/ruby-amazon/ under "Changes in 0.9.1: ". They had the same problems. Perhaps it helps.
 [2006-11-04 15:28 UTC] ttsuruoka at php dot net (Tatsuya Tsuruoka)
This has been fixed in the latest released version (0.7.0). Thank you for reporting!