8 Entity (实体)
8 Entity (实体)
若未受请求方法或响应状态码另行限制, 请求与响应消息 MAY 传输实体。实体由 entity-header 字段与 entity-body 组成, 尽管某些响应仅包含 entity-header。
本节中, 发送方与接收方视谁发送与谁接收实体而定, 均可能指客户端或服务器。
8.1 Entity Header Fields (实体头部字段)
Entity-header 字段定义关于 entity-body 的可选元信息, 若无 body, 则关于请求所标识资源。
entity-header = Allow ; Section 12.4
| Content-Base ; Section 12.11
| Content-Encoding ; Section 12.12
| Content-Language ; Section 12.13
| Content-Length ; Section 12.14
| Content-Location ; Section 12.15
| Content-Type ; Section 12.16
| Expires ; Section 12.19
| Last-Modified ; Section 12.24
| extension-header
extension-header = message-header
extension-header 机制允许在不改协议的情况下定义更多 entity-header 字段, 但不能假定接收方能够识别这些字段。无法识别的头部字段 SHOULD 被接收方忽略并由代理转发。
8.2 Entity Body (实体体)
见 [H7.2]