Corrects self-link in Atom 1.0 feeds.
* (bug 3666) Don't spew PHP warnings in prefs on unrecognized site language
* (bug 2392) Fix Atom items content type, upgrade to Atom 1.0
* Allow $wgFeedCacheTimeout of 0 to disable feed caching
+* Fix WebRequest::getRequestURL() to strip off the host bits squid prepends
=== Caveats ===
* @return string
*/
function getRequestURL() {
- return $_SERVER['REQUEST_URI'];
+ $base = $_SERVER['REQUEST_URI'];
+ if( $base{0} == '/' ) {
+ return $base;
+ } else {
+ // We may get paths with a host prepended; strip it.
+ return preg_replace( '!^[^:]+://[^/]+/!', '/', $base );
+ }
}
/**