12.3. HTTP message structure

发布时间 :2024-02-22 23:00:07 UTC      

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.

Principles, Technologies, and Methods of Geographic Information Systems  102

In recent years, Geographic Information Systems (GIS) have undergone rapid development in both theoretical and practical dimensions. GIS has been widely applied for modeling and decision-making support across various fields such as urban management, regional planning, and environmental remediation, establishing geographic information as a vital component of the information era. The introduction of the “Digital Earth” concept has further accelerated the advancement of GIS, which serves as its technical foundation. Concurrently, scholars have been dedicated to theoretical research in areas like spatial cognition, spatial data uncertainty, and the formalization of spatial relationships. This reflects the dual nature of GIS as both an applied technology and an academic discipline, with the two aspects forming a mutually reinforcing cycle of progress.