Ticket #6189: mythweb-trunk-content-range.2.patch
| File mythweb-trunk-content-range.2.patch, 1.7 KB (added by , 17 years ago) |
|---|
-
mythplugins/mythweb/modules/stream/stream_mp4.pl
51 51 binmode DATA; 52 52 53 53 my $start = 0; 54 my $end = $size ;54 my $end = $size-1; 55 55 my $total_size = $size; 56 56 my $read_size = 1024; 57 57 my $mtime = (stat($filename))[9]; … … 71 71 if ($ENV{'HTTP_RANGE'}) { 72 72 # Figure out the size of the requested chunk 73 73 ($start, $end) = $ENV{'HTTP_RANGE'} =~ /bytes\W+(\d*)-(\d*)\W*$/; 74 if ($end < 1 || $end > $size) { 75 $end = $size; 74 $start ||= 0; 75 $end ||= 0; 76 if ($end < 1 || $end >= $size) { 77 $end = $size-1; 76 78 } 77 79 $size = $end - $start+1; 78 80 if ($read_size > $size) { -
mythplugins/mythweb/modules/stream/stream_raw.pl
57 57 58 58 # Requested a range? 59 59 my $start = 0; 60 my $end = $size ;60 my $end = $size-1; 61 61 my $total_size = $size; 62 62 if ($ENV{'HTTP_RANGE'}) { 63 63 # Figure out the size of the requested chunk 64 64 ($start, $end) = $ENV{'HTTP_RANGE'} =~ /bytes\W+(\d*)-(\d*)\W*$/; 65 65 $start ||= 0; 66 if ($end < 1 || $end > $size) { 67 $end = $size; 66 $end ||= 0; 67 if ($end < 1 || $end >= $size) { 68 $end = $size-1; 68 69 } 69 $size = $end - $start ;70 $size = $end - $start+1; 70 71 } 71 72 72 73 # Print the header
