ViewVC Help
View File | Revision Log | Show Annotations | Download File
/cvs/Coro/eg/myhttpd
(Generate patch)

Comparing Coro/eg/myhttpd (file contents):
Revision 1.13 by root, Mon Feb 18 17:48:00 2008 UTC vs.
Revision 1.14 by root, Tue Jun 3 13:35:12 2008 UTC

292 }; 292 };
293 293
294 my @code = (200, "ok"); 294 my @code = (200, "ok");
295 my ($l, $h); 295 my ($l, $h);
296 296
297 if ($self->{h}{range} =~ /^bytes=(.*)$/) { 297 if ($self->{h}{range} =~ /^bytes=(.*)$/i) {
298 for (split /,/, $1) { 298 for (split /,/, $1) {
299 if (/^-(\d+)$/) { 299 if (/^-(\d+)$/) {
300 ($l, $h) = ($length - $1, $length - 1); 300 ($l, $h) = ($length - $1, $length - 1);
301 } elsif (/^(\d+)-(\d*)$/) { 301 } elsif (/^(\d+)-(\d*)$/) {
302 ($l, $h) = ($1, ($2 ne "" || $2 >= $length) ? $2 : $length - 1); 302 ($l, $h) = ($1, ($2 ne "" || $2 >= $length) ? $2 : $length - 1);

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines