httpd: fix handling of range requests