[wp-trac] [WordPress Trac] #13909: Redirect does not return a HTTP body
WordPress Trac
wp-trac at lists.automattic.com
Wed Jun 23 16:51:10 UTC 2010
#13909: Redirect does not return a HTTP body
--------------------------+-------------------------------------------------
Reporter: hakre | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version: 3.0
Severity: normal | Keywords: has-patch
--------------------------+-------------------------------------------------
Changes (by hakre):
* keywords: needs-patch => has-patch
Comment:
To summarize since this is now some says older:
* HTTP specifies a hypertext fragment should be output on redirects
(Status Codes 3xx) - WordPress does not conform with that currently.
* Doing so globally would break the Plugin activation functionality
because it operates with overwriting headers in case of not crashing.
* WP_Redirect does handle even non-redirect stati. That's violating HTTP
specs, valid redirect status codes have to be in the 300-399 range.
So WP_Redirect must be put in context when used to redirect. Attached
patch reflects that by introducing a new parameter to control hypertext
output, a filter to let plugins control that as well as a introducing a
new pluggable function and a new filter to offer control for the redirect
hypertext design.
Additionally the function has been improved to prevent wrong-filtered
status codes to accidently used as those are not releated to redirects
(non 3xx codes handling).
--
Ticket URL: <http://core.trac.wordpress.org/ticket/13909#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list