Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Storing incomplete responses #25

Open
mnot opened this issue Dec 10, 2018 · 1 comment
Open

Storing incomplete responses #25

mnot opened this issue Dec 10, 2018 · 1 comment
Labels

Comments

@mnot
Copy link
Collaborator

mnot commented Dec 10, 2018

A response message is considered complete when all of the octets indicated by the message framing ([RFC7230]) are received prior to the connection being closed. If the request method is GET, the response status code is 200 (OK), and the entire response header section has been received, a cache MAY store an incomplete response message body if the cache entry is recorded as incomplete. Likewise, a 206 (Partial Content) response MAY be stored as if it were an incomplete 200 (OK) cache entry. However, a cache MUST NOT store incomplete or partial-content responses if it does not support the Range and Content-Range header fields or if it does not understand the range units used in those fields.

A cache MAY complete a stored incomplete response by making a subsequent range request ([RFC7233]) and combining the successful response with the stored entry, as defined in Section 3.3. A cache MUST NOT use an incomplete response to answer requests unless the response has been made complete or the request is partial and specifies a range that is wholly within the incomplete response. A cache MUST NOT send a partial response to a client without explicitly marking it as such using the 206 (Partial Content) status code.

@mnot mnot added the new test label Dec 11, 2018
@mnot
Copy link
Collaborator Author

mnot commented Oct 12, 2020

  • cache may store incomplete 200, serve 206 from it
  • cache must not store incomplete if it doesn't support Range/Content-Range
  • cache must not use incomplete response for a complete request
  • cache must mark incomplete with 206

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant