multipart/byteranges
Multipart

Overview

multipart/byteranges is the media type a server uses to send several non-contiguous byte ranges of one resource together in a single response. It appears in 206 Partial Content responses when a client requests multiple ranges.

Details

When a client requests several ranges at once, like `Range: bytes=0-99,500-599`, the server puts `Content-Type: multipart/byteranges; boundary=...` on the 206 response and wraps each range as a separate part. Each part carries the original `Content-Type` and a `Content-Range: bytes 0-99/1234` header identifying that range, separated by the boundary delimiter. For a single range, the server instead places that range directly in the body and uses a `Content-Range` response header rather than this type.

This mechanism helps fetch parts of large files (resuming downloads) or specific portions of a PDF or video. However, assembling multiple ranges into one response varies widely across server/proxy implementations, and a known attack floods the server with many overlapping ranges to exhaust resources (the historical Apache Range header DoS), so servers should cap the number of allowed ranges.

Syntax

e.g. Content-Type: multipart/byteranges; boundary=3d6b6a416f9b5

Notes

Related types

Related headers