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

Bug #16655 Package redirection broken; returns DOAP
Submitted: 2009-09-29 13:06 UTC
From: aharvey Assigned: cweiske
Status: Closed Package: pearweb (version 1.23.1)
PHP Version: Irrelevant OS: Irrelevant
Roadmaps: (Not assigned)    
Subscription  


 [2009-09-29 13:06 UTC] aharvey (Adam Harvey)
Description: ------------ "Redirected" package URLs (eg http://pear.php.net/package/DB/redirected, which of course is what you get redirected to when you go to http://pear.php.net/DB) are currently not returning what they should be; instead of the package page they are returning DOAP information. This appears to occur regardless of browser and request headers — I can reproduce it reliably with Firefox, Safari and curl. Test script: --------------- From the command line: [aharvey@zombiejesus tmp]$ curl -D - http://pear.php.net/package/DB/redirected Expected result: ---------------- HTTP/1.1 200 OK Date: Tue, 29 Sep 2009 08:03:09 GMT Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.6 Connection: close Transfer-Encoding: chunked Content-Type: text/html; charset=UTF-8 <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> ... normal content of http://pear.php.net/package/DB omitted ... </html> Actual result: -------------- HTTP/1.1 200 OK Date: Tue, 29 Sep 2009 08:01:38 GMT Server: Apache/2.2.3 (CentOS) X-Powered-By: PHP/5.2.6 Content-Length: 3603 Connection: close Content-Type: application/rdf+xml <?xml version="1.0" encoding="utf-8"?> <rdf:RDF xmlns="http://usefulinc.com/ns/doap#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:foaf="http://xmlns.com/foaf/0.1/" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xml:lang="en"> <Project rdf:about="http://pear.php.net/package/DB"><name>DB</name><homepage rdf:resource="http://pear.php.net/package/DB"/><created>2002-04-23</created><shortdesc xml:lang="en">Database Abstraction Layer</shortdesc><description xml:lang="en">DB is a database abstraction layer providing: ... normal DOAP document omitted ... </rdf:RDF>

Comments

 [2009-09-29 13:19 UTC] aharvey (Adam Harvey)
 [2009-09-29 13:22 UTC] aharvey (Adam Harvey)
I don't have a pearweb installation to test this with, but my interpretation of the diff from pearweb 1.22.1 to now suggests that the attached patch _should_ fix it; it looks like nothing more than the 'doap' case being put into package-info.php in the wrong place, given that the 'redirected' case doesn't have a break and hence used to fall through to the default. Side, unrelated note: 1.21.1 appears to have been the last version that was actually tagged in SVN.
 [2009-09-29 16:25 UTC] cweiske (Christian Weiske)
-Status: Open +Status: Closed -Assigned To: +Assigned To: cweiske
This bug has been fixed in SVN. If this was a documentation problem, the fix will appear on pear.php.net by the end of next Sunday (CET). If this was a problem with the pear.php.net website, the change should be live shortly. Otherwise, the fix will appear in the package's next release. Thank you for the report and for helping us make PEAR better. Patch was correct.