1 / 17
文档名称:

http协议详解(Detailed explanation of HTTP protocol).doc

格式:doc   大小:24KB   页数:17页
下载后只包含 1 个 DOC 格式的文档,没有任何的图纸或源代码,查看文件列表

如果您已付费下载过本站文档,您可以点这里二次下载

分享

预览

http协议详解(Detailed explanation of HTTP protocol).doc

上传人:rjmy2261 2017/11/18 文件大小:24 KB

下载得到文件列表

http协议详解(Detailed explanation of HTTP protocol).doc

相关文档

文档介绍

文档介绍:http协议详解(Detailed explanation of HTTP protocol)
The HTTP request consists of three parts:
Request line, message header, request text.
Request line (format):
Method Request-URI HTTP-Version CRLF
Method: method.
GET requests access to resources identified by Request-URI.
POST adds new data to the resource identified by Request-URI.
The HEAD request gets the response message header of the resource identified by the Request-URI.
The PUT request server stores a resource and uses Request-URI as its identifier.
The DELETE request server deletes the resources identified by the Request-URI.
TRACE requests the server to send back the requested information, the main language test or diagnosis.
CONNECT reserves future use.
OPTIONS requests to query the performance of the server, or to query the resource related options and requirements.
Request-URI: unified resource identifier.
HTTP-Version:HTTP version.
CRLF: return line feed. (\r\n)
Cases:
GET / HTTP/ \r\n
HTTP Response
After receiving and interpreting the request message, the server returns a HTTP response message.
Like the HTTP request, the HTTP response is posed of three parts:
Status line, message header, response body.
State line:
The state line is described by protocol version, status code in digital form, and the corresponding state description. Each element is separated by space.
Format: HTTP-Version Status-Code Reason-Phrase CRLF
For example: HTTP/ 200 OK \r\n
Status code:
The status code is made up of 3 digits to indicate whether the request is understood or satisfied.
State description:
The state description gives a short text description of the status code.
The first number of the status code defines the category of the response, and the latter two have no specific classification.
The first digit has five possible values:
- 1xx: indicates information - indicates that the request has been received and continues processing.
- 2xx: ess - indicates that the request has