if ( $wgVaryOnXFP ) {
$varyHeader[] = 'X-Forwarded-Proto';
}
- $response->header( 'Vary: ' . implode( ', ', $varyHeader ) );
+ if ( count( $varyHeader ) ) {
+ $response->header( 'Vary: ' . implode( ', ', $varyHeader ) );
+ }
wfProfileOut( __METHOD__ );
return;
} else {
}
$thumbPath = $img->getThumbPath( $thumbName );
if ( $img->getRepo()->fileExists( $thumbPath ) ) {
- $headers[] = 'Vary: ' . implode( ', ', $varyHeader );
+ if ( count( $varyHeader ) ) {
+ $headers[] = 'Vary: ' . implode( ', ', $varyHeader );
+ }
$img->getRepo()->streamFile( $thumbPath, $headers );
wfProfileOut( __METHOD__ );
return;
wfProfileOut( __METHOD__ );
return;
}
- $headers[] = 'Vary: ' . implode( ', ', $varyHeader );
+
+ if ( count( $varyHeader ) ) {
+ $headers[] = 'Vary: ' . implode( ', ', $varyHeader );
+ }
// Thumbnail isn't already there, so create the new thumbnail...
try {