Add Content-Length header to thumb.php error responses
Without the Content-Length header, the response is sent with Transfer-Encoding: Chunked, which is somehow mangled by mod_fastcgi. Varnish then claims the response is malformed and declines to process it, sending the client a 503 instead. Change-Id: I977387bf3e039926df58e3e5a14d0d0bd55201c4
This commit is contained in:
parent
de25144a0b
commit
0ee9e717f4
1 changed files with 3 additions and 1 deletions
|
|
@ -570,7 +570,7 @@ function wfThumbError( $status, $msg ) {
|
|||
} else {
|
||||
$debug = '';
|
||||
}
|
||||
echo <<<EOT
|
||||
$content = <<<EOT
|
||||
<!DOCTYPE html>
|
||||
<html><head>
|
||||
<meta charset="UTF-8" />
|
||||
|
|
@ -586,4 +586,6 @@ $debug
|
|||
</html>
|
||||
|
||||
EOT;
|
||||
header( 'Content-Length: ' . strlen( $content ) );
|
||||
echo $content;
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue