Index: trunk/phase3/tests/phpunit/includes/HttpTest.php |
— | — | @@ -17,7 +17,9 @@ |
18 | 18 | static $has_proxy = false; |
19 | 19 | static $proxy = "http://hulk:8080/"; |
20 | 20 | var $test_geturl = array( |
| 21 | + "ftp://ftp.kernel.org/", |
21 | 22 | "http://www.example.com/", |
| 23 | + "https://secure.wikimedia.org/", |
22 | 24 | "http://pecl.php.net/feeds/pkg_apc.rss", |
23 | 25 | "http://toolserver.org/~jan/poll/dev/main.php?page=wiki_output&id=3", |
24 | 26 | "http://meta.wikimedia.org/w/index.php?title=Interwiki_map&action=raw", |
— | — | @@ -540,7 +542,7 @@ |
541 | 543 | return array( |
542 | 544 | array( false, '¿non sens before!! http://a', 'Allow anything before URI' ), |
543 | 545 | |
544 | | - # (ftp|http|https) - only three schemes allowed |
| 546 | + # (ftp|http|https) - only three schemes allowed |
545 | 547 | array( true, 'http://www.example.org/' ), |
546 | 548 | array( true, 'https://www.example.org/' ), |
547 | 549 | array( true, 'ftp://www.example.org/' ), |
Index: trunk/phase3/includes/HttpFunctions.php |
— | — | @@ -713,7 +713,9 @@ |
714 | 714 | $this->postData = wfArrayToCGI( $this->postData ); |
715 | 715 | } |
716 | 716 | |
717 | | - if ( $this->parsedUrl['scheme'] != 'http' ) { |
| 717 | + if ( $this->parsedUrl['scheme'] != 'http' && |
| 718 | + $this->parsedUrl['scheme'] != 'ftp' && |
| 719 | + $this->parsedUrl['scheme'] != 'https' ) { |
718 | 720 | $this->status->fatal( 'http-invalid-scheme', $this->parsedUrl['scheme'] ); |
719 | 721 | } |
720 | 722 | |