Edit report at https://bugs.php.net/bug.php?id=63696&edit=1

 ID:                 63696
 Updated by:         [email protected]
 Reported by:        krinklemail at gmail dot com
 Summary:            PHP.net: Manual "Add note" script broken on php.net
-Status:             Open
+Status:             Closed
 Type:               Bug
 Package:            Website problem
 PHP Version:        Irrelevant
-Assigned To:        
+Assigned To:        danbrown
 Block user comment: N
 Private report:     N

 New Comment:

We recently made some changes to better-serve the website users, and one of the 
most drastic changes created an error with the 301 redirects.

I made two moderately-sized batch commits to the website repositories this 
morning, and updated the primary web server configuration to resolve this and 
several other issues.

The base tag just tells the client that all media and links not referred with a 
static hostname should be accessed from the provided domain.  Thus:

http://php.example.net/images/logo.png // Will always go to php.example.net
/images/logo.png // Will be loaded from the <base href="(.*)"> host
images/logo.png // Will be loaded from the <base href="(.*)"> host

Thanks for your investigation and report.  Please let us know if you continue 
to 
experience problems, or discover new issues with the website.


Previous Comments:
------------------------------------------------------------------------
[2012-12-05 12:00:25] krinklemail at gmail dot com

Description:
------------
Steps to reproduce problem:
* Go to http://php.net/manual/add-note.php?
sect=reserved.variables.server&redirect=http://php.net/manual/en/reserved.variable
s.server.php
* Fill in the form
* Submit the form (use Preview if you want to avoid sending the submission for 
real)

Expected result:
* add-note.php adds type=hidden fields for GET[sect] and GET[redirect]
* Together with my input, they are sent over POST to the server
* Response: "Your submission was successful -- thanks for contributing!"

Actual result:
* add-note.php adds type=hidden fields for GET[sect] and GET[redirect]
* Together with my input, they are sent over POST to the server
* Response: The same page again, but without the form. Message "To add a note, 
you 
must click on the "Add Note" button" in place of the form.


This is caused by the fact that php.net pages have a <base> tag, set to 
www.php.net and www.php.net is a 301 redirect to php.net.

So the POST request is forwarded as GET, without the POST payload. And worst of 
all, it is a loop (pressing Submit press will loop back, and then the same).

Assuming that www is always a redirect and that <base> is also outputted on 
other 
pages, this bug will be happening on any POST request, not just add-note.php.

Please fix the <base> tag for php.net to point to php.net, not www.php.net.

PS: What is the purpose of this <base> tag anyway?



------------------------------------------------------------------------



-- 
Edit this bug report at https://bugs.php.net/bug.php?id=63696&edit=1

-- 
PHP Webmaster List Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to