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

Bug #13487 Invalid HTTP request method on META redirect
Submitted: 2008-03-25 03:48 UTC
From: spockboy Assigned: avb
Status: Closed Package: HTTP_Client (version 1.1.1)
PHP Version: Irrelevant OS: Linux
Roadmaps: (Not assigned)    
Subscription  


 [2008-03-25 03:48 UTC] spockboy (Daniel Simmons)
Description: ------------ After making a POST request, HTTP_Client follows META tag redirects using a subsequent POST request, instead of a GET request, if the page containing the META tag was served using a 2xx. (Similar to bug #1854). This type of page is most commonly encountered in online forums, where a user will make a post, and then be taken to a 'thank you' page containing links they can use to navigate onwards. The 'thank you' page often contains a META tag that redirects the user onwards after a few seconds if they do not choose a link presented to them on the page. I suspect that this bug was introduced when functionality was added in #5734. Test script: --------------- See test scripts. HTTP_Client, making a POST request: http://www.spockboy.com/pear-http-client/client.phps A 'thank you' page, which contains a META refresh redirect: http://www.spockboy.com/pear-http-client/redirect.phps A destination page, which expects a GET request: http://www.spockboy.com/pear-http-client/dest.phps Expected result: ---------------- Redirected to 'dest.php', which prints 'GET' as the HTTP request method. Actual result: -------------- Redirected to 'dest.php', which prints 'POST' as the HTTP request method.

Comments

 [2008-05-14 12:19 UTC] doconnor (Daniel O'Connor)
I'd love to see <meta> redirection out of HTTP_Client and put into something else - a Web_Agent / Web_HTML_Agent as it were. Also; the practice is discouraged by the W3C (http://www.w3.org/TR/WCAG10-HTML-TECHS/#meta-element) That being said, it certainly doesn't fix your problem when consuming these websites
 [2008-10-11 11:43 UTC] avb (Alexey Borzov)
This bug has been fixed in CVS. 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.