[wp-trac] [WordPress Trac] #31200: wp_redirect Missing Body - Causes Performance Issues
WordPress Trac
noreply at wordpress.org
Mon Feb 2 14:59:40 UTC 2015
#31200: wp_redirect Missing Body - Causes Performance Issues
--------------------------+------------------------------
Reporter: tripsis | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: Awaiting Review
Component: General | Version: 4.1
Severity: normal | Resolution:
Keywords: | Focuses: performance
--------------------------+------------------------------
Comment (by Fab1en):
Hi tripsis, and thanks for reporting this issue.
If the issue only happens with Nginx + Varnish configuration, I think the
correction should be specific to this configuration. There is perhaps an
option in the varnish config to immediately return when a 301 redirect is
detected ? Here is [http://syntaxheaven.com/configure-nginx-php-fpm-apc-
varnish-for-wordpress/ a post] that describe the settings needed for NGinx
+ Varnish for WordPress.
Correcting this behavior to comply to RFC specs might raise new issues.
`wp_redirect` does not call `exit` after having set the redirection
status, but rely on the caller to do it, so output some content could
break some existing features. For example, when a plugin is activated, a
`wp_redirect` to the failure page is called before activating the plugin,
in the case where a fatal error happens during plugin activation. Redirect
status is then changed back to success page if the plugin has been
activated successfully.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31200#comment:1>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list