What Is an HTTP Server?

http is a simple request-response protocol, which usually runs on top of TCP. It specifies what messages the client might send to the server and what kind of response it gets. The request and response message headers are given in ASCII; the message content has a MIME-like format. This simple model contributed to the success of the early Web because it made development and deployment so straightforward. [1]

At the beginning of the birth of HTTP, it was mainly used to obtain content on the WEB side. At that time, the content was not as rich as it is now, the layout was not so exquisite, and there were almost no user interaction scenarios. For this simple scenario of getting web content, HTTP performed reasonably well. But with the development of the Internet and the birth of WEB2.0, more content began to be displayed (more image files), typography became more exquisite (more CSS), and more complex interactions were also introduced (more JS). The total amount of data and requests that users load when opening the homepage of a website is also increasing.
Today, the homepage of most portals will exceed 2M in size, and the number of requests can be as high as 100. Another widely used application is the client APP on the mobile Internet. Different types of apps use HTTP very differently. For e-commerce apps, there may be more than 10 requests to load the homepage. For IM such as WeChat, HTTP requests may be limited to the download of voice and image files, and the frequency of requests is not high.
HTTP is based on the client / server model and is connection-oriented. A typical HTTP transaction is processed as follows: [8]
In the WWW, "client" and "server" are relative concepts that exist only during a specific connection, that is, a client in one connection may serve as a server in another connection. The client / server mode information exchange process based on the HTTP protocol is divided into four processes: establishing a connection, sending request information, sending response information, and closing the connection. [7]
HTTP messages consist of a request from the client to the server and a response from the server to the client. The request message format is as follows: [7]
1xx: information
News
description
100 Continue
The server received only part of the request, but once the server did not reject the request, the client should continue to send the rest of the request.
101 Switching Protocols
Server conversion protocol: The server will switch to another protocol in accordance with the client's request.
2xx: success
News
description
200 OK
Request succeeded (followed by response documents to GET and POST requests.)
201 Created
The request is created and a new resource is created.
202 Accepted
The request for processing was accepted, but processing was not completed.
203 Non-authoritative Information
The document has returned normally, but some response headers may be incorrect because a copy of the document is used.
204 No Content
No new documents. The browser should continue to display the original document. This status code is useful if the user refreshes the page periodically and the servlet can determine that the user documentation is sufficiently new.
205 Reset Content
No new documents. But the browser should reset what it displays. Used to force the browser to clear form input.
206 Partial Content
The client sends a GET request with a Range header and the server completes it.
3xx: redirect
News
description
300 Multiple Choices
Multiple selection. List of links. The user can select a link to reach the destination. A maximum of five addresses is allowed.
301 Moved Permanently
The requested page has been transferred to a new url.
302 Found
The requested page has been temporarily transferred to a new url.
303 See Other
The requested page can be found under another URL.
304 Not Modified
The document was not modified as expected. The client has a buffered document and sends a conditional request (usually providing an If-Modified-Since header indicating that the client only wants documents that are newer than the specified date). The server tells the client that the original buffered document can still be used.
305 Use Proxy
The document requested by the client should be fetched through the proxy server indicated by the Location header.
306 Unused
This code was used in the previous version. It is no longer used, but the code is still retained.
307 Temporary Redirect
The requested page has been temporarily moved to a new url.
4xx: client error
News
description
400 Bad Request
The server failed to understand the request.
401 Unauthorized
The requested page requires a username and password.
401.1
Login failed.
401.2
Server configuration caused login failure.
401.3
Unauthorized due to ACL resource restrictions.
401.4
Filter authorization failed.
401.5
ISAPI / CGI application authorization failed.
401.7
Access is denied by the URL authorization policy on the web server. This error code is specific to IIS 6.0.
402 Payment Required
This code is not yet available.
403 Forbidden
Access to the requested page is prohibited.
403.1
Executive access is prohibited.
403.2
Read access is prohibited.
403.3
Write access is prohibited.
403.4
Requires SSL.
403.5
Requires SSL 128.
403.6
The IP address was rejected.
403.7
Requires client certificate.
403.8
Site access is denied.
403.9
Too many users.
403.10
The configuration is invalid.
403.11
Password change.
403.12
Access denied to the mapping table.
403.13
The client certificate is revoked.
403.14
Reject directory listing.
403.15
Client access exceeded.
403.16
The client certificate is untrusted or invalid.
403.17
The client certificate has expired or is not yet valid.
403.18
The requested URL cannot be executed in the current application pool. This error code is specific to IIS 6.0.
403.19
CGI cannot be performed for clients in this application pool. This error code is specific to IIS 6.0.
403.20
Passport login failed. This error code is specific to IIS 6.0.
404 Not Found
The server cannot find the requested page.
404.0
(None)-No files or directories were found.
404.1
The Web site cannot be accessed on the requested port.
404.2
The web service extension locking policy is blocking this request.
404.3
The MIME mapping policy is blocking this request.
405 Method Not Allowed
The method specified in the request is not allowed.
406 Not Acceptable
The server-generated response cannot be accepted by the client.
407 Proxy Authentication Required
The user must first authenticate with a proxy server before the request can be processed.
408 Request Timeout
The request exceeded the server's waiting time.
409 Conflict
The request could not be completed due to a conflict.
410 Gone
The requested page is not available.
411 Length Required
"Content-Length" is undefined. Without this content, the server will not accept the request.
412 Precondition Failed
The precondition in the request was evaluated as failed by the server.
413 Request Entity Too Large
The server will not accept the request because the requested entity is too large.
414 Request-url Too Long
Because the URL is too long, the server will not accept the request. This happens when a post request is converted into a get request with a long query.
415 Unsupported Media Type
The server will not accept the request because the media type is not supported.
416 Requested Range Not Satisfiable
The server cannot satisfy the Range header specified by the client in the request.
417 Expectation Failed
Execution failed.
423
Locking error.
5xx: server error
News
description
500 Internal Server Error
The request was not completed. The server encountered an unpredictable situation.
500.12
The application is busy restarting on the web server.
500.13
The web server is too busy.
500.15
Direct requests to Global.asa are not allowed.
500.16
UNC authorization credentials are incorrect. This error code is specific to IIS 6.0.
500.18
The URL authorization store cannot be opened. This error code is specific to IIS 6.0.
500.100
Internal ASP error.
501 Not Implemented
The request was not completed. The server does not support the requested function.
502 Bad Gateway
The request was not completed. The server received an invalid response from the upstream server.
502.1
CGI application timed out. ·
502.2
CGI application error.
503 Service Unavailable
The request was not completed. The server is temporarily overloaded or down.
504 Gateway Timeout
Gateway timed out.
505 HTTP Version Not Supported
The server does not support the HTTP protocol version specified in the request.
The HTTP request and response messages include the HTTP protocol version number. There is some confusion about the correct use and interpretation of the HTTP version number and the interoperability of the HTTP implementation of different protocol conversions. Refer to RFC 2145 for the use and interpretation of HTTP version numbers. [9]

IN OTHER LANGUAGES

Was this article helpful? Thanks for the feedback Thanks for the feedback

How can we help? How can we help?