Last modified: 2010-05-15 15:32:57 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T3980, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1980 - Port 443 added to https / SSL URLs
Port 443 added to https / SSL URLs
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
Installer (Other open bugs)
1.4.x
All All
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-04-26 00:28 UTC by Ryan Schmidt
Modified: 2010-05-15 15:32 UTC (History)
0 users

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Ryan Schmidt 2005-04-26 00:28:29 UTC
When I visit my MediaWiki 1.4.2 installation at https://www.example.com/wiki I get redirected to https://
www.example.com:443/wiki/index.php/Main_Page. There's no reason for the port number to get inserted there, since 
it's the default port for https / SSL connections, and it uglies up the URL. Here's the patch to make it not do that 
anymore (same strategy used by phpMyAdmin):


--- includes/DefaultSettings.php	(revision 1131)
+++ includes/DefaultSettings.php	(working copy)
@@ -55,7 +55,7 @@
 $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
 
 $wgServer = $wgProto.'://' . $wgServerName;
-if( isset( $_SERVER['SERVER_PORT'] ) && $_SERVER['SERVER_PORT'] != 80 ) {
+if( isset( $_SERVER['SERVER_PORT'] ) && ( ( $wgProto == 'http' && $_SERVER['SERVER_PORT'] != 80 ) || ( $wgProto == 
'https' && $_SERVER['SERVER_PORT'] != 443 ) ) ) {
 	$wgServer .= ":" . $_SERVER['SERVER_PORT'];
 }
 unset($wgProto);
Comment 1 JeLuF 2005-04-29 07:42:12 UTC
Fixed in CVS HEAD, DefaultSettings.php, rev 1.294

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links