Umherirrender has uploaded a new change for review.

  https://gerrit.wikimedia.org/r/129925

Change subject: http -> https rewrite: Only replace one http by https
......................................................................

http -> https rewrite: Only replace one http by https

This avoids changing from
http://de.wikipedia.org/wiki/Spezial:Weblinksuche/http://wikimedia.org
to
https://de.wikipedia.org/wiki/Spezial:Weblinksuche/https://wikimedia.org
instead of
https://de.wikipedia.org/wiki/Spezial:Weblinksuche/http://wikimedia.org

Bug: 63573
Change-Id: Ife5099c3c5a0e943bb08b81be5d5669d0e02be17
---
M includes/Wiki.php
1 file changed, 1 insertion(+), 1 deletion(-)


  git pull ssh://gerrit.wikimedia.org:29418/mediawiki/core 
refs/changes/25/129925/1

diff --git a/includes/Wiki.php b/includes/Wiki.php
index 2ef1382..8af4565 100644
--- a/includes/Wiki.php
+++ b/includes/Wiki.php
@@ -542,7 +542,7 @@
                        $request->getProtocol() == 'http'
                ) {
                        $oldUrl = $request->getFullRequestURL();
-                       $redirUrl = str_replace( 'http://', 'https://', $oldUrl 
);
+                       $redirUrl = str_replace( 'http://', 'https://', 
$oldUrl, 1 );
 
                        if ( $request->wasPosted() ) {
                                // This is weird and we'd hope it almost never 
happens. This

-- 
To view, visit https://gerrit.wikimedia.org/r/129925
To unsubscribe, visit https://gerrit.wikimedia.org/r/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: Ife5099c3c5a0e943bb08b81be5d5669d0e02be17
Gerrit-PatchSet: 1
Gerrit-Project: mediawiki/core
Gerrit-Branch: master
Gerrit-Owner: Umherirrender <[email protected]>

_______________________________________________
MediaWiki-commits mailing list
[email protected]
https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits

Reply via email to