Multiple slashes at the start of the request url will look like a
protocol-relative url, so strip the extra slashes.
Bug: 46607
Change-Id: I34c3fc9d8f9467e83cd201cb099c2d26f3a39b36
$base = substr( $base, 0, $hash );
}
if( $base[0] == '/' ) {
+ if( $base[1] == '/' ) { /* More than one slash will look like it is protocol relative */
+ return preg_replace( '!//*!', '/', $base );
+ }
return $base;
} else {
// We may get paths with a host prepended; strip it.