| OLD | NEW |
| 1 #!/usr/bin/perl -w | 1 #!/usr/bin/perl -wT |
| 2 | 2 |
| 3 use strict; | 3 use strict; |
| 4 | 4 |
| 5 use CGI; | 5 use CGI; |
| 6 use File::stat; | 6 use File::stat; |
| 7 | 7 |
| 8 use constant CHUNK_SIZE_BYTES => 1024; | 8 use constant CHUNK_SIZE_BYTES => 1024; |
| 9 | 9 |
| 10 my $query = new CGI; | 10 my $query = new CGI; |
| 11 | 11 |
| (...skipping 65 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 if (($total >= $filesize) || ($total > $parsedRange[1])) { | 77 if (($total >= $filesize) || ($total > $parsedRange[1])) { |
| 78 last; | 78 last; |
| 79 } | 79 } |
| 80 | 80 |
| 81 # Throttle if there is some. | 81 # Throttle if there is some. |
| 82 if ($chunkPerSec > 0) { | 82 if ($chunkPerSec > 0) { |
| 83 select(undef, undef, undef, 1.0 / $chunkPerSec); | 83 select(undef, undef, undef, 1.0 / $chunkPerSec); |
| 84 } | 84 } |
| 85 } | 85 } |
| 86 close(FILE); | 86 close(FILE); |
| OLD | NEW |