Make WordPress Core

Opened 14 years ago

Closed 9 years ago

#17718 closed defect (bug) (worksforme)

Don't redirect if user is already on port 80

Reported by: davidcx's profile davidcx Owned by:
Milestone: Priority: normal
Severity: normal Version: 3.1.3
Component: Canonical Keywords: https
Focuses: Cc:

Description

If user is already using port 80 but $original['port'] is set to 80 anyway, do not send a needless redirect.

wp-includes/canonical.php line 324

change from

if ( !empty( $original['port'] ) )

change to

if ( !empty( $original['port'] ) && $original['port'] != 80 )

Fixes, for example, Nagios's check_http getting sent a redirect rather than the page content.

-davidc

Attachments (3)

17718.diff (474 bytes) - added by kawauso 14 years ago.
17718.2.diff (469 bytes) - added by MikeHansenMe 12 years ago.
refreshed
17718.3.diff (556 bytes) - added by MikeHansenMe 10 years ago.

Download all attachments as: .zip

Change History (12)

#1 @dd32
14 years ago

  • Component changed from General to Canonical

#2 @kawauso
14 years ago

  • Keywords has-patch added

@kawauso
14 years ago

@MikeHansenMe
12 years ago

refreshed

#3 @MikeHansenMe
12 years ago

  • Cc mdhansen@… added

#4 @chriscct7
10 years ago

  • Milestone changed from Awaiting Review to 4.3
  • Owner set to chriscct7
  • Status changed from new to reviewing

#5 @wonderboymusic
10 years ago

  • Owner chriscct7 deleted

curl -I http://wordpress-core-develop:80/blog/2015/05/09/hey/ does not produce a redirect right now for me ....

Can someone give me example steps for how to properly reproduce this problem?

#6 @obenland
10 years ago

  • Milestone changed from 4.3 to Future Release

No movement in 4.3, let's look at it again in a future release.

#7 @iriebeatz
9 years ago

I'm currently having an issue maybe related to this. I got a redirection loop on the main site, but the wp-admin is working. I set the Site URL to wp.dev:3000 because I use browser-sync. The admin pannel forces //wp.dev:3000 I also tried wp.com:3000 but again it forces // and will not allow a http protocol.

Last edited 9 years ago by iriebeatz (previous) (diff)

#8 @johnbillion
9 years ago

  • Keywords https added

#9 @ericlewis
9 years ago

  • Keywords has-patch removed
  • Milestone Future Release deleted
  • Resolution set to worksforme
  • Status changed from reviewing to closed

I also cannot reproduce a redirect as @wonderboymusic couldn't either.

I'm going to close this out. If someone can provide steps to reproduce, please reopen.

Note: See TracTickets for help on using tickets.