HTTP head, status code, and Web server workflow

Source: Internet
Author: User

HTTP protocol Header: Image/jpeg dynamic effects: Java, applets, JRE Dynamic Web page:

Server-side stored document non-HTML format, but the programming language development script, the script accepts the parameter after the server runs once,
After the completion of the operation, HTML-formatted documents are generated, and the generated documents are sent to the client;
Cases:
web:index.php execution Process: web--Procotol PHP (Run index.php) index.html:
You can use hyperlinks in this file to reference N Web objects (URLs) to Dynamic Web pages: containing static content and dynamic content (dynamic content parts are required to run)
Cache:
URL: (Uniform Resource Locator) HTTP message: Request message, Response message Request message Syntax: Response message Syntax

HTTP status code:

1xx: Pure information
2XX: Success class Information This type of status code, representing the request has been successfully received, understood, and accepted by the server (200)
OK: The request was successful and the desired response header or data body will be returned with this response. This status code appears to indicate a normal state.
3XX: Redirect class information This type of status code represents the need for the client to take further action to complete the request. (301)
301 Moved Permanently: The requested resource has been permanently moved to a new location, and any future references to this resource should use one of several URIs returned by this response.
4XX: Client Error class information (403,404)
403 Forbidden: Insufficient permissions, the server has understood the request, but refuses to execute it.
404 Not Found: The request failed and the client request was not found on the server for the desired resource. The most likely cause of this error is that the server side does not have this page.
5XX: Server-side Error class information (500,502,503,504)
Internal Server Error: this is generally because the server-side source code error occurs.
502 Bad Gateway: An invalid response was received from the upstream server when the server acting as a gateway or proxy attempted to execute the request.
503 Service Unavailable: The server is currently unable to process requests due to temporary (transient) server maintenance or overloading.
504 Gateway Timeout: failed to receive a response from the upstream server when attempting to execute the request as a gateway or agent-working server.

Note: Some proxy servers return 400 or 500 errors in DNS query timeout

Response message:

Each header field consists of a name and a value (value) separated by commas. In addition, the response message usually has a body of information called the body, that is, the content of the response to the client.

main operations of the Web server:

1, establish the connection-accept or reject the client connection request;
2, receive the request--read the HTTP request message through the network;
3, processing request-parse the request message and make the corresponding action;
4, access to resources-access to the relevant resources in the request message;
5, build the response--use the correct header to generate HTTP response messages;
6, send the response-send the generated response message to the client;
7, logging-when the completed HTTP transaction logs into the log file;

For example: A page contains: Ten image, 3 CSS, 5html, a total of 18 resources. These 18 resources are a one-off request, one-to-one transfer. So now the browser is multi-threaded.
http, TCP: Three-time handshake, four disconnects http/1.1: Enhanced cache feature long connection

HTTP head, status code, and Web server workflow

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.