Index: trunk/phase3/includes/WebRequest.php |
— | — | @@ -603,14 +603,14 @@ |
604 | 604 | * Return the request URI with the canonical service and hostname, path, |
605 | 605 | * and query string. This will be suitable for use as an absolute link |
606 | 606 | * in HTML or other output. |
| 607 | + * |
| 608 | + * If $wgServer is protocol-relative, this will return a fully |
| 609 | + * qualified URL with the protocol that was used for this request. |
607 | 610 | * |
608 | | - * NOTE: This will output a protocol-relative URL if $wgServer is protocol-relative |
609 | | - * |
610 | 611 | * @return String |
611 | 612 | */ |
612 | 613 | public function getFullRequestURL() { |
613 | | - global $wgServer; |
614 | | - return $wgServer . $this->getRequestURL(); |
| 614 | + return wfExpandUrl( $this->getRequestURL(), PROTO_CURRENT ); |
615 | 615 | } |
616 | 616 | |
617 | 617 | /** |
Index: trunk/phase3/includes/Wiki.php |
— | — | @@ -187,7 +187,7 @@ |
188 | 188 | $title = SpecialPage::getTitleFor( $name, $subpage ); |
189 | 189 | } |
190 | 190 | } |
191 | | - $targetUrl = $title->getFullURL(); |
| 191 | + $targetUrl = wfExpandUrl( $title->getFullURL(), PROTO_CURRENT ); |
192 | 192 | // Redirect to canonical url, make it a 301 to allow caching |
193 | 193 | if ( $targetUrl == $request->getFullRequestURL() ) { |
194 | 194 | $message = "Redirect loop detected!\n\n" . |