[wp-trac] [WordPress Trac] #31200: wp_redirect Missing Body - Causes Performance Issues
WordPress Trac
noreply at wordpress.org
Mon Feb 2 16:20:33 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 tripsis):
Thanks Fab1en,
It looks like that config you sent me is for Varnish 3. I'm using Varnish
4, which is pretty new but is ultimately gaining in popularity. The config
works perfectly fine, except for this one issue, which isn't present in
Varnish 3. There doesn't seem to be anything different in the config you
sent me in regards to this problem, which is why I presume it's just
handled differently in version 4.
Perhaps they're following the RFC spec more closely in Varnish 4, because
it's worth noting that this is not a WordPress specific problem. It's
reproducible with just the following code:
{{{
<?php header("Location: http://google.com"); ?>
}}}
However, I would expect to start seeing it become more of a problem as
more people move over to Varnish 4.
I understand that you can't output a body in the wp_redirect function
because this may break existing plugins, etc., but I'd argue that for
redirects in the WP core you should output a body to comply with the RFC
spec even if this body is defined outside of the wp_redirect function, in
order to not break legacy code.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/31200#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list