Fix URL comparison used for cacheability decision
[lhc/web/wiklou.git] / includes / MediaWiki.php
index 669d8e9..2a0a405 100644 (file)
@@ -393,7 +393,11 @@ class MediaWiki {
                if ( $action instanceof Action ) {
                        # Let Squid cache things if we can purge them.
                        if ( $this->config->get( 'UseSquid' ) &&
-                               in_array( $request->getFullRequestURL(), $requestTitle->getSquidURLs() )
+                               in_array(
+                                       // Use PROTO_INTERNAL because that's what getSquidURLs() uses
+                                       wfExpandUrl( $request->getRequestURL(), PROTO_INTERNAL ),
+                                       $requestTitle->getSquidURLs()
+                               )
                        ) {
                                $output->setSquidMaxage( $this->config->get( 'SquidMaxage' ) );
                        }