Here I am going to make a summary of what is required in HTTP responses according to HTTP/1.1 rfc.
There are SHOULDs and MAYs in rfc, which I omit from my table as I will check only required restrictions.
source:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html#sec10 :
| response's status code | MUST NOT | MUST |
| 204 No Content | include message-body | |
| 205 Reset Content | include an entity | |
| 206 Partial Content | include other entity-headers if the response is the result of an If-Range request that used a weak validator | include
- Content-Range header or multipart/byteranges Content-Type including Content-Range fields for each part.
- If a Content-Length header field is present, it MUST match the actual number of OCTETs transmitted in the message-body.
- Date
- ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request
- Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous response for the same variant
|
| 304 Not Modified |
- contain a message-body
- include other entity-headers if weak validator
| include
- Date, unless its omission is required by section 14.18.1
- ETag and/or Content-Location, if the header would have been sent in a 200 response to the same request
- Expires, Cache-Control, and/or Vary, if the field-value might differ from that sent in any previous response for the same variant
|
| 401 Unauthorized | | include a WWW-Authenticate header field |
| 405 Method Not Allowed | | include an Allow header containing a list of valid methods for the requested resource. |
| 416 Requested Range Not Satisfiable | response MUST NOT use the multipart/byteranges content- type | |
Žádné komentáře:
Okomentovat