Add Content-Length header to thumb.php redirects
[lhc/web/wiklou.git] / thumb.php
index 5c4eea7..03a3f35 100644 (file)
--- a/thumb.php
+++ b/thumb.php
@@ -213,6 +213,7 @@ function wfStreamThumb( array $params ) {
                        if ( count( $varyHeader ) ) {
                                $response->header( 'Vary: ' . implode( ', ', $varyHeader ) );
                        }
+                       $response->header( 'Content-Length: 0' );
                        return;
                }
 
@@ -309,6 +310,7 @@ function wfStreamThumb( array $params ) {
                        wfThumbError( 500, 'Could not stream the file' );
                } else {
                        RequestContext::getMain()->getStats()->timing( 'media.thumbnail.stream', $streamtime );
+                       wfDebugLog( 'thumbnailaccess', time() . ' ' . $thumbPath . ' ' . ob_get_length() . ' Streamed ' );
                }
                return;
        }