当前位置:在线查询网 > 在线百科全书查询 > HTTP消息类型

HTTP消息类型_在线百科全书查询


请输入要查询的词条内容:

HTTP消息类型


HTTP消息由客户端到服务器的请求和由服务器到客户端的回应组成。

HTTP-message = Simple-Request ; HTTP/0.9 messages

| Simple-Response

| Full-Request ; HTTP/1.0 messages

| Full-Response

完整的请求(Full-Request)和完整的回应(Full-Response)都使用RFC822[7]中实体传

输部分规定的消息格式。两者的消息都可能包括标题域(headers,可选)、实体主体(entity

body)。实体主体与标题间通过空行来分隔(即CRLF前没有内容的行)。

Full-Request = Request-Line ; Section 5.1

*( General-Header ; Section 4.3

| Request-Header ; Section 5.2

| Entity-Header ) ; Section 7.1

CRLF

[ Entity-Body ] ; Section 7.2

Full-Response = Status-Line ; Section 6.1

*( General-Header ; Section 4.3

| Response-Header ; Section 6.2

| Entity-Header ) ; Section 7.1

CRLF

[ Entity-Body ] ; Section 7.2

简单请求(Simple_Request)与简单回应(Simple-Response)不允许使用任何标题信息,

并限制只能使用唯一的请求方法(GET)

Simple-Request = "GET" SP Request-URI CRLF

Simple-Response = [ Entity-Body ]

不提倡使用简单方式请求格式,因为它防止了服务器在接到简单请求时对返回实体的介

质类型进行验证。

相关分词: HTTP 消息 类型