[wp-trac] [WordPress Trac] #33821: redirect_canonical does not consider port in $compare_original
WordPress Trac
noreply at wordpress.org
Thu Jun 12 10:56:40 UTC 2025
#33821: redirect_canonical does not consider port in $compare_original
-------------------------------------------------+-------------------------
Reporter: willshouse | Owner: (none)
Type: defect (bug) | Status: reopened
Priority: normal | Milestone: Future
| Release
Component: Canonical | Version: 2.3
Severity: normal | Resolution:
Keywords: has-patch needs-unit-tests needs- | Focuses:
test-info close |
-------------------------------------------------+-------------------------
Comment (by siliconforks):
Replying to [comment:18 willshouse]:
> Other than perhaps a change in behavior where Apache would be adding the
port into the HTTP_HOST variable - but the suggested patch does check for
this, in order to avoid adding a port number twice.
That's the part that doesn't really make sense here - the port should
always be in `HTTP_HOST` when it's a non-standard port: it's required by
the HTTP specification. So I don't see how it's possible to actually
reproduce this (unless perhaps you use a buggy/malfunctioning HTTP
client?)
I think in order to resolve this issue, it will be necessary to know the
exact conditions under which it occurs, including (but not necessarily
limited to) the following information:
1. What browser/client is being used?
2. What server is being used? (Apache?)
3. Is there a reverse proxy server being used?
4. What version of HTTP is being used? (HTTP 1.1? HTTP 2? ...)
5. Does this happen only with HTTPS? Or can this issue also be observed
with unencrypted HTTP on a non-standard port?
6. What are the values of `siteurl` and `home` in the wp_options table?
(Or the values of the `WP_SITEURL` and `WP_HOME` constants, if using
these)
7. What URL is being accessed?
8. What URL is it being redirected to? (Because this is supposed to cause
a loop, I assume this is the same as the answer to question 7 above?
Unless it's a case of URL A redirecting to URL B, and then B redirecting
back to A...)
9. Anything else you can think of that might be necessary to reproduce
this
--
Ticket URL: <https://core.trac.wordpress.org/ticket/33821#comment:19>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list