-
-
Notifications
You must be signed in to change notification settings - Fork 74
Description
To be added to https://ramaproxy.org/docs/rama/http/service/web/response/index.html
relevant rfcs:
- octet-stream: https://datatracker.ietf.org/doc/html/rfc2046#section-4.5.1
- byte ranges: https://datatracker.ietf.org/doc/html/rfc7233#section-2.1
The application/octet-stream
MIME type is used in HTTP to represent arbitrary binary data. It's the default fallback when the server doesn’t know the specific content type of a file. When this type is returned, most clients (especially browsers) will treat the response as a downloadable file instead of attempting to render it. Servers often pair this with the Content-Disposition: attachment
header to prompt a "Save as" dialog, optionally suggesting a filename. This content type carries no format-specific semantics — it's just raw bytes.
For large files or streaming scenarios, HTTP supports byte-range requests using the Range
header. A client can request specific byte offsets (e.g. Range: bytes=0-499
), and the server responds with 206 Partial Content
along with the Content-Range
header. This mechanism enables download resumption, chunked streaming, and efficient media seeking. When multiple ranges are requested, the server can reply with a multipart/byteranges
response. All of this works independently of the actual content type — including application/octet-stream
— since range semantics are handled at the HTTP protocol level.
Reference implementations: