oxidecomputer / oxidecomputer/progenitor
support range requests
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 1k
- Forks
- 136
- Avg merge
- 8h 36m
- Merged PRs (30d)
- 14
Description
It does not currently seem possible to be able to make a HTTP range request for an endpoint that returns a binary asset (i.e., not a JSON-formatted response). I believe we would need the following things:
- some way to add a Range header with a value like bytes=1000-4999 (representing a request for 4000 bytes starting at offset 1000) on a request as part of building it
- to accept either a HTTP 200 OK or a HTTP 206 Partial Content response in the case of a range request
- to provide a useful error in the case that we get a HTTP 416 Range Not Satisfiable response
- to expose the value of the Content-Range header in the response to the consumer so that we can confirm that the server understood our range request
- to expose the value of the Aceept-Ranges header from the response to a GET or (especially) HEAD request, so that a client can determine if the server is reporting range request support
I couldn't immediately find a way for an OpenAPI definition document to report support for range requests, so it would be up to the consumer and the server to correctly negotiate them using the regular pattern of headers and HEAD requests.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing how generated clients build requests and handle binary responses, then identify where HTTP headers and status codes are exposed. Define completion around sending Range, accepting 200 or 206, reporting 416 meaningfully, and exposing Content-Range and Accept-Ranges for GET or HEAD responses.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- api
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100