206

Partial Content

2xx Success

Back to list

Server perspective

Use 206 when a valid Range request asks for one or more portions of a representation.

When to use

  • Return 206 for resumable downloads, media seeking, and partial fetches
  • Use it only when the request included a satisfiable range

How to respond

  • Include Content-Range for single-range responses
  • Use multipart/byteranges when returning multiple ranges

Headers to consider

  • Content-Range
  • Accept-Ranges
  • Content-Type

Response body

  • Return the requested range bytes, or multipart body parts for multiple ranges

Server-side pitfalls

  • Do not use 206 when the client did not ask for a range
  • Return 416 instead when the requested range cannot be satisfied

Examples

Resumable download

Request:GET /backup.zip with Range: bytes=500000-
Response:206 Partial Content with Content-Range

The server sends only the missing tail of the file.

References

Related 2xx Success Codes