Last modified: 2010-05-15 15:27:00 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 T3573, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 1573 - Script-URL generation breaks up when using https
Script-URL generation breaks up when using https
Status: RESOLVED FIXED
Product: MediaWiki
Classification: Unclassified
General/Unknown (Other open bugs)
1.3.x
PC Linux
: Normal normal (vote)
: ---
Assigned To: Nobody - You can work on this!
:
Depends on:
Blocks:
  Show dependency treegraph
 
Reported: 2005-02-21 17:48 UTC by Jörg Gottschlich
Modified: 2010-05-15 15:27 UTC (History)
1 user (show)

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


Attachments

Description Jörg Gottschlich 2005-02-21 17:48:50 UTC
Wikimedia is installed on a virtual host with SSL enabled: https://wiki.server.com.    
This works fine so far, but when clicking on Save after editing an article, the server returns a "Invalid    
request" and the scheme shows "http" instead of "https" (however the article is saved and putting an "s"    
behind the http helps to continue).    
The problem seems to be the $_SERVER['HTTPS'] check in DefaultSettings.php which apparently doesn't work    
(we're running Apache 2.0.52 and PHP 4.3.10 on Gentoo Linux). After some changes (see below) it works fine  
now by using the port as criterium for https detection (s. code).    
Also I added the prefix $wgServer in the line    
    
$wgScriptPath = $wgServer . '/wiki';    
    
because it was missing.     
    
Changes in DefaultSettings.php:   
    
# check if server use https:    
if ((isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on')    
  || (isset($_SERVER['SERVER_PORT']) && $_SERVER['SERVER_PORT']==443)) {    
        $wgProto = 'https';    
} else {    
        $wgProto = 'http';    
}    
   
# original statement    
# $wgProto = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] == 'on') ? 'https' : 'http';
Comment 1 Alan Canon 2005-07-28 20:00:08 UTC
That works for me too, except that I have to use the string "ON" (capitalized)
for comparison, as that's what my PHP engine provides.
Comment 2 Niklas Laxström 2005-08-27 16:40:53 UTC
Works with 1.6alpha, should work with 1.5 series too

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


Navigation
Links