Qaynaq LABS · TOOLS

HTTP · 2xx Success

206 Partial Content

Server successfully fulfills a range request for part of a resource.

When you see this status

  • Client sends Range header requesting specific byte ranges
  • Server supports range requests and resource is large
  • Client uses HTTP/1.1 with partial content support
  • Server splits response into multiple parts for streaming

Common causes

  • Client explicitly requests partial content via Range header
  • Server implements HTTP/1.1 range requests
  • Resource is large and supports byte-range requests
  • Client uses Accept-Ranges header in request

How to debug it

  1. Verify Range header format in client request
  2. Check server logs for range request handling
  3. Ensure Content-Range header is present in response
  4. Validate Content-Length matches requested range
  5. Test with tools like curl using -r flag

Return this code in your framework

Express (Node.js)
res.status(206).set('Content-Range', 'bytes 0-99/1000').send(data.slice(0, 100));
FastAPI (Python)
return Response(content=data[0:100], status_code=206, headers={"Content-Range": "bytes 0-99/1000"})
NestJS
@Get() getPartial(@Res() res: Response) { res.status(206).set('Content-Range', 'bytes 0-99/1000').send(data.slice(0, 100)); }
Go (net/http)
w.WriteHeader(http.StatusPartialContent); w.Header().Set("Content-Range", "bytes 0-99/1000"); w.Write(data[0:100])

About HTTP 206

HTTP status code 206 Partial Content is part of the 2xx Success family. Server successfully fulfills a range request for part of a resource. Understanding it is essential for backend engineers, API designers, and anyone debugging integrations between services.

The Qaynaq Labs HTTP Status Code Explainer covers all standard codes with practical guidance: what triggers them, how to debug them in production, and exactly how to return them from common frameworks. Each code page is hand-curated and verified.

Frequently asked

How does the client request partial content?

Include a Range header like 'Range: bytes=0-99' in the request. Server responds with 206 if supported.

What is the Content-Range header format?

Format is 'bytes start-end/total' where start/end are inclusive. Example: 'bytes 0-99/1000'.

Can 206 be used for multipart responses?

No. For multiple ranges, server returns 200 with multipart/byteranges content type.