… | |
… | |
203 | |
203 | |
204 | delete $blocked{$ip}; |
204 | delete $blocked{$ip}; |
205 | } |
205 | } |
206 | |
206 | |
207 | if (%{$conn{$ip}} > $::MAX_CONN_IP) { |
207 | if (%{$conn{$ip}} > $::MAX_CONN_IP) { |
208 | $self->slog("blocked ip $ip"); |
208 | $self->slog(2, "blocked ip $ip"); |
209 | $self->err_blocked; |
209 | $self->err_blocked; |
210 | } |
210 | } |
211 | |
211 | |
212 | $req =~ /^(?:\015\012)? |
212 | $req =~ /^(?:\015\012)? |
213 | (GET|HEAD) \040+ |
213 | (GET|HEAD) \040+ |
… | |
… | |
400 | |
400 | |
401 | satisfiable: |
401 | satisfiable: |
402 | # check for segmented downloads |
402 | # check for segmented downloads |
403 | if ($l && $::NO_SEGMENTED) { |
403 | if ($l && $::NO_SEGMENTED) { |
404 | if (%{$uri{$self->{uri}}} > 1) { |
404 | if (%{$uri{$self->{uri}}} > 1) { |
405 | $self->slog("segmented download refused\n"); |
|
|
406 | $self->err(400, "segmented downloads are not allowed"); |
405 | $self->err(400, "segmented downloads are not allowed"); |
407 | } |
406 | } |
408 | } |
407 | } |
409 | |
408 | |
410 | $hdr->{"Content-Range"} = "bytes $l-$h/$length"; |
409 | $hdr->{"Content-Range"} = "bytes $l-$h/$length"; |