【原文】
The Hypertext Transfer Protocol (HTTP) is a stateless application-level request/response protocol that uses extensible semantics and self-descriptive message payloads for flexible interaction with network-based hypertext information systems. This document is the first in a series of documents that collectively form the HTTP/1.1 specification:
- "Message Syntax and Routing" (this document)
- "Semantics and Content" [RFC7231]
- "Conditional Requests" [RFC7232]
- "Range Requests" [RFC7233]
- "Caching" [RFC7234]
- "Authentication" [RFC7235]
超文本传输协议(HTTP) 是无状态的应用层的传输/响应协议,用来拓展语义和自描述消息有效载荷使其可以与基于网络的超文本信息系统灵活交互。本文档是 HTTP/1.1 系列文档集合的第一部分:
- 消息语法与路由(本文档)
- 语义和内容
- 条件请求
- 范围请求
- 缓存
- 认证
This HTTP/1.1 specification obsoletes RFC 2616 and RFC 2145 (on HTTP versioning). This specification also updates the use of CONNECT to establish a tunnel, previously defined in RFC 2817, and defines the "https" URI scheme that was described informally in RFC 2818.
该 HTTP/1.1 规范废弃了 RFC 2616 和 RFC 2145(HTTP 版本)。该规范也更新了 CONNECT 建立隧道的使用,之前在 RFC 2817 定义, 和在 RFC 2818 的非正式描述定义 “https” URL 方案。
HTTP is a generic interface protocol for information systems. It is designed to hide the details of how a service is implemented by presenting a uniform interface to clients that is independent of the types of resources provided. Likewise, servers do not need to be aware of each client's purpose: an HTTP request can be considered in isolation rather than being associated with a specific type of client or a predetermined sequence of application steps. The result is a protocol that can be used effectively in many different contexts and for which implementations can evolve independently over time.
HTTP 是为信息系统打造的通用接口协议。它也被设计为将独立类型的资源提供者通过呈现一个统一的接口给客户端隐藏服务端的实现。同样,服务端无需知道每个客户端的目的:一个 HTTP 请求是独立隔离的而不是与特定类型的客户端所绑定或与应用程序的执行顺序相关联。这使协议可以在许多不同的场景应用和随着时间的推移进一步发展。
HTTP is also designed for use as an intermediation protocol for translating communication to and from non-HTTP information systems. HTTP proxies and gateways can provide access to alternative information services by translating their diverse protocols into a hypertext format that can be viewed and manipulated by clients in the same way as HTTP services.
HTTP 也被设计作为一个传输通信中介协议在非 HTTP 信息系统来往传输通信。HTTP 代理和网关可以通过把它们的多种协议翻译成超文本格式从而提供访问替代信息服务,然后通过客户端以相同的 HTTP 服务即可查看和操作。
One consequence of this flexibility is that the protocol cannot be defined in terms of what occurs behind the interface. Instead, we are limited to defining the syntax of communication, the intent of received communication, and the expected behavior of recipients. If the communication is considered in isolation, then successful actions ought to be reflected in corresponding changes to the observable interface provided by servers. However, since multiple clients might act in parallel and perhaps at cross-purposes, we cannot require that such changes be observable beyond the scope of a single response.
协议太灵活的一个后果是不能对接口背后发生的事情定义术语。不仅如此,我们限制定义通信的语法,接收通信的意图,和收件人的预期行为。如果通信被单独考虑,那么成功的动作应该被反映在由服务器提供的可观察接口的相应变化中。然而,由于多个客户端可能并行操作,并且可能会由交叉目的地,我们不能要求这些变化在单个响应的范围外可观察。
This document describes the architectural elements that are used or referred to in HTTP, defines the "http" and "https" URI schemes, describes overall network operation and connection management, and defines HTTP message framing and forwarding requirements. Our goal is to define all of the mechanisms necessary for HTTP message handling that are independent of message semantics, thereby defining the complete set of requirements for message parsers and message forwarding intermediaries.
该文档描述的架构元素被 HTTP 使用或参考,定义了 “http” 和 “https” URL 结构,描述涵盖整体网络运算和连接管理,定义了 HTTP 消息结构和转发要求。我们的目标是为 HTTP 消息处理独立的消息语义定义需要的所有机制,从而为消息解析和消息转发中介定义了一整套完整的需求集合。