Dave Jarvis' Repositories

git clone https://repo.autonoma.ca/repo/keenwrite.git

Moves content range into partial content condition

AuthorDaveJarvis <email>
Date2023-11-10 19:11:08 GMT-0800
Commit57c06462c245eadd461d7d4852d9ff577e62932b
Parentc63fcdd
Delta3 lines added, 3 lines removed
www/downloads/counter.php
if( $seek_start > 0 || $seek_end < ($size - 1) ) {
header( 'HTTP/1.1 206 Partial Content' );
- }
- $range_bytes = $seek_start . '-' . $seek_end . '/' . $size;
+ $range_bytes = $seek_start . '-' . $seek_end . '/' . $size;
+ header( "Content-Range: bytes $range_bytes" );
+ }
header( "Content-Type: $content_type" );
header( 'Pragma: public' );
header( 'Expires: 0' );
header( 'Cache-Control: must-revalidate, post-check=0, pre-check=0' );
header( 'Cache-Control: public' );
header( 'Accept-Ranges: bytes' );
- header( "Content-Range: bytes $range_bytes" );
header( 'Content-Length: ' . ($seek_end - $seek_start + 1) );
header( 'Content-Transfer-Encoding: binary' );