diff options
author | Roan Kattouw <catrope@users.mediawiki.org> | 2009-04-24 19:50:50 +0000 |
---|---|---|
committer | Roan Kattouw <catrope@users.mediawiki.org> | 2009-04-24 19:50:50 +0000 |
commit | 13d180553d128193c6fbfeac1ff92c2695676316 (patch) | |
tree | 6aa223bc38e88e419f2d24e51f7f79b12bb32e96 /api.php | |
parent | f744c13787854798e7f755d5fa784cfbfbcce77d (diff) | |
download | mediawikicore-13d180553d128193c6fbfeac1ff92c2695676316.tar.gz mediawikicore-13d180553d128193c6fbfeac1ff92c2695676316.zip |
API: (bug 13049) This'll hopefully fix the 403 Forbidden error in api.php for the setups that were getting them (most notably FastCGI and IIS). Patch by Chris Wrinn
Notes
Notes:
http://mediawiki.org/wiki/Special:Code/MediaWiki/49833
Diffstat (limited to 'api.php')
-rw-r--r-- | api.php | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -51,10 +51,10 @@ wfProfileIn('api.php'); // // Ensure that all access is through the canonical entry point... // -if( isset( $_SERVER['SCRIPT_URL'] ) ) { - $url = $_SERVER['SCRIPT_URL']; +if( isset( $_SERVER['SCRIPT_NAME'] ) ) { + $url = $_SERVER['SCRIPT_NAME']; } else { - $url = $_SERVER['PHP_SELF']; + $url = $_SERVER['URL']; } if( strcmp( "$wgScriptPath/api$wgScriptExtension", $url ) ) { wfHttpError( 403, 'Forbidden', |