if ($mdomain and $file =~ s:(.+)/(.+)/(.+):$3:) {
$to = lc $1;
$from = lc $2;
+ $to =~ s/[:,].*//;
$to .= '@'.$hostname if $to eq 'anonymous';
$from .= '@'.$hostname if $from eq 'anonymous';
$to .= '@'.$mdomain if -d "$to\@$mdomain";
} else {
$range = sprintf("bytes %s-%s/%s",$seek,$total_size-1,$total_size);
}
+ # RFC 7233 "Responses to a Range Request"
nvt_print(
'HTTP/1.1 206 Partial Content',
"Content-Length: $size",
"Connection: close",
);
# nvt_print('','HTTP/1.1 200 OK',"Content-Length: $size","Content-Type: $type"); exit;
+ nvt_print($_) foreach(@extra_header);
} else {
http_header('200 OK');
print html_header($head);
if ($type eq 'application/octet-stream') {
nvt_print(qq'Content-Disposition: attachment; filename="$filename"');
}
+ nvt_print($_) foreach(@extra_header);
}
nvt_print("X-Size: $total_size");