samtools / hts-specs

Specifications of SAM/BAM and related high-throughput sequencing file formats
http://samtools.github.io/hts-specs/
644 stars 174 forks source link

refget: v2 spec for Range header errors does not align with typical usage #771

Open davidlougheed opened 4 months ago

davidlougheed commented 4 months ago

For range headers, it is generally accepted that the Range Not Satisfiable error is to be used if a "document doesn't contain such ranges".

In Refget v2, 400 Bad Request is used for this instead; I believe a 416 would be better because it can then require a Content-Range response header with the total sequence length, allowing clients to subsequently discover valid range queries that can be made and aligning better with the original intent of HTTP range responses.