Hypertext Transfer protocol--Hypertext Transfer Protocol
url--Uniform Resource Locator (http://qq.com)
uri--Uniform Resource Identifier (Http://user:[email protected]:80/dir/index.htm?q=1#top)
Protocol/login information/URL/port number/path/query string/fragment identifier
Application protocol on a TCT/IP protocol
One, the process of accessing the link, Example 1:
1. Client Input url:http://www.baidu.com
2. The DNS server resolves the domain name and returns the IP address of the domain name
3, the TCP protocol sends the message frame to the corresponding IP address of the server
4. After the server receives the request, the response message is sent to the client via TCP/IP protocol
5, the HTTP protocol is responsible for parsing the response of the message
Second, HTTP is a stateless protocol
1. A new response will be created each time the request is sent
2, the current site generally by storing cookies in the browser environment to identify requests
Third, message structure
1. Request message
Message header + blank line + message body
Message header: Request line, request header, General header, utility header, other
2. Response message
Message header + blank line + message body
Message header: Status line, response header, General header, utility header, other
Four, error code
1, 2xx--response success
2.3xx--redirect
3.4xx--Client Error
5, 5xx--server-side error
HTTP (Simple)