12.3. HTTP message structure

发布时间 : 2025-10-25 13:33:17 UTC      

Page Views: 9 views

HTTP is a client / server-based architecture model that exchanges information through a reliable link and is a stateless request / response protocol.

An HTTP “client” is an application (Web browser or any other client) that connects to the server to send one or more HTTP requests to the server.

A HTTP “server” is also an application (usually a Web service, such as an Apache Web server or IIS server, etc.) by receiving requests from the clientand sending HTTP response data to the client.

HTTP uses uniform resource identifiers (Uniform Resource Identifiers, URI) to transfer data and establish connections.

Once the connection is established, the data message is in a format similar to that used by Internet mail [RFC5322] And Multi-purpose Internet Mail extensions (MIME) [RFC2045] To transmit.

12.3.1. Client request message

The request message that the client sends a HTTP request to the server includes the following format: request line (request line), request header (header), blank line and request data. The following figure shows the general format of the request message.

Image0

12.3.2. Server response message

The HTTP response also consists of four parts: the status line, the message header, the blank line, and the response body.

Image1

12.3.3. Example

The following example is a typical use of GET to pass an example of data:

Client request:

GET /hello.txt HTTP/1.1 User-Agent: curl/7.16.3 libcurl/7.16.3 OpenSSL/0.9.7l zlib/1.2.3 Host: www.example.com Accept-Language: en, mi 

Server response:

HTTP/1.1 200 OK Date: Mon, 27 Jul 2009 12:28:53 GMT Server: Apache Last-Modified: Wed, 22 Jul 2009 19:15:56 GMT ETag: "34aa387-d-1568eb00" Accept-Ranges: bytes Content-Length: 51 Vary: Accept-Encoding Content-Type: text/plain 

Output result:

Hello World! My payload includes a trailing CRLF. 
《地理信息系统原理、技术与方法》  97

最近几年来,地理信息系统无论是在理论上还是应用上都处在一个飞速发展的阶段。 GIS被应用于多个领域的建模和决策支持,如城市管理、区划、环境整治等等,地理信息成为信息时代重要的组成部分之一; “数字地球”概念的提出,更进一步推动了作为其技术支撑的GIS的发展。 与此同时,一些学者致力于相关的理论研究,如空间感知、空间数据误差、空间关系的形式化等等。 这恰好说明了地理信息系统作为应用技术和学科的两个方面,并且这两个方面构成了相互促进的发展过程。