http://www.mediawiki.org/wiki/Special:Code/MediaWiki/89278
Revision: 89278
Author: mah
Date: 2011-06-01 18:57:33 +0000 (Wed, 01 Jun 2011)
Log Message:
-----------
Fix Bug #29231: PhpHttpRequest doesn't support HTTPS
Tested fix with PHPUnit Tests that aren't currently executed by
CruiseControl b/c they're marked ?\226?\128?\156broken?\226?\128?\157 till
someone comes up with
some reasonable unit tests that will work for everyone.
Modified Paths:
--------------
trunk/phase3/includes/HttpFunctions.php
trunk/phase3/tests/phpunit/includes/HttpTest.php
Modified: trunk/phase3/includes/HttpFunctions.php
===================================================================
--- trunk/phase3/includes/HttpFunctions.php 2011-06-01 18:32:17 UTC (rev
89277)
+++ trunk/phase3/includes/HttpFunctions.php 2011-06-01 18:57:33 UTC (rev
89278)
@@ -713,7 +713,9 @@
$this->postData = wfArrayToCGI( $this->postData );
}
- if ( $this->parsedUrl['scheme'] != 'http' ) {
+ if ( $this->parsedUrl['scheme'] != 'http' &&
+ $this->parsedUrl['scheme'] != 'ftp' &&
+ $this->parsedUrl['scheme'] != 'https' ) {
$this->status->fatal( 'http-invalid-scheme',
$this->parsedUrl['scheme'] );
}
Modified: trunk/phase3/tests/phpunit/includes/HttpTest.php
===================================================================
--- trunk/phase3/tests/phpunit/includes/HttpTest.php 2011-06-01 18:32:17 UTC
(rev 89277)
+++ trunk/phase3/tests/phpunit/includes/HttpTest.php 2011-06-01 18:57:33 UTC
(rev 89278)
@@ -17,7 +17,9 @@
static $has_proxy = false;
static $proxy = "http://hulk:8080/";
var $test_geturl = array(
+ "ftp://ftp.kernel.org/",
"http://www.example.com/",
+ "https://secure.wikimedia.org/",
"http://pecl.php.net/feeds/pkg_apc.rss",
"http://toolserver.org/~jan/poll/dev/main.php?page=wiki_output&id=3",
"http://meta.wikimedia.org/w/index.php?title=Interwiki_map&action=raw",
@@ -540,7 +542,7 @@
return array(
array( false, '¿non sens before!! http://a', 'Allow
anything before URI' ),
- # (ftp|http|https) - only three schemes allowed
+ # (ftp|http|https) - only three schemes allowed
array( true, 'http://www.example.org/' ),
array( true, 'https://www.example.org/' ),
array( true, 'ftp://www.example.org/' ),
_______________________________________________
MediaWiki-CVS mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs