Movatterモバイル変換


[0]ホーム

URL:


  1. Web
  2. HTTP
  3. Reference
  4. HTTP response status codes
  5. 206 Partial Content

206 Partial Content

The HTTP206 Partial Contentsuccessful response status code is sent in response to arange request.The response body contains the requested ranges of data as specified in theRange header of the request.

The format of the response depends on the number of ranges requested.If a single range is requested, theContent-Type of the entire response is set to the type of the document, and aContent-Range is provided.If several ranges are requested, theContent-Type is set tomultipart/byteranges, and each fragment covers one range, with its ownContent-Range andContent-Type headers describing it.

Status

http
206 Partial Content

Examples

Receiving a206 response for a single requested range

The following is a sample206 response when a single range of21010- (bytes 21010 to the end of file) of an image file is requested.The response containsContent-Type ofimage/gif and theContent-Range is provided:

http
GET /z4d4kWk.gif HTTP/1.1Host: images.example.comRange: bytes=21010-
http
HTTP/1.1 206 Partial ContentDate: Wed, 15 Nov 2015 06:25:24 GMTLast-Modified: Wed, 15 Nov 2015 04:58:08 GMTContent-Range: bytes 21010-47021/47022Content-Length: 26012Content-Type: image/gifETag: "abc123"Accept-Ranges: bytes# 26012 bytes of partial image data…

Receiving a206 response for multiple requested ranges

Following is a sample206 response when two ranges of a PDF file are requested.The response contains themultipart/byterangesContent-Type with a separateContent-Type (application/pdf) andContent-Range for each range.

http
GET /price-list.pdf HTTP/1.1Host: example.comRange: bytes=234-639,4590-7999
http
HTTP/1.1 206 Partial ContentDate: Wed, 15 Nov 2015 06:25:24 GMTLast-Modified: Wed, 15 Nov 2015 04:58:08 GMTContent-Length: 1741Content-Type: multipart/byteranges; boundary=String_separatorETag: "abc123"Accept-Ranges: bytes--String_separatorContent-Type: application/pdfContent-Range: bytes 234-639/8000# content of first range (406 bytes)--String_separatorContent-Type: application/pdfContent-Range: bytes 4590-7999/8000# content of second range (3410 bytes)--String_separator--

Specifications

Specification
HTTP Semantics
# status.206

See also

Help improve MDN

Learn how to contribute

This page was last modified on byMDN contributors.


[8]ページ先頭

©2009-2026 Movatter.jp