Ticket #6189: mythweb-trunk-content-range.patch
| File mythweb-trunk-content-range.patch, 787 bytes (added by , 17 years ago) |
|---|
-
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
