mirror of
https://github.com/ZoneMinder/zoneminder.git
synced 2026-01-23 13:38:57 -05:00
fix php outputting extra newlines after content
This commit is contained in:
@@ -141,6 +141,8 @@ if( !empty($_REQUEST['height']) ) {
|
||||
|
||||
|
||||
header( 'Content-type: image/jpeg' );
|
||||
ob_clean();
|
||||
flush();
|
||||
|
||||
if ( $errorText ) {
|
||||
Error( $errorText );
|
||||
@@ -187,4 +189,3 @@ if ( $errorText ) {
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -85,6 +85,10 @@ header("Content-Range: bytes $begin-$end/$size");
|
||||
header("Content-Transfer-Encoding: binary\n");
|
||||
header('Connection: close');
|
||||
|
||||
// Apparently without these we get a few extra bytes of output at the end...
|
||||
ob_clean();
|
||||
flush();
|
||||
|
||||
$cur = $begin;
|
||||
fseek( $fh, $begin, 0 );
|
||||
|
||||
@@ -94,5 +98,3 @@ while( ! feof( $fh ) && $cur < $end && ( connection_status() == 0 ) ) {
|
||||
$cur += 1024*16;
|
||||
usleep(100);
|
||||
}
|
||||
|
||||
?>
|
||||
|
||||
Reference in New Issue
Block a user