In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-24 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Xiaosheng blog: http://xsboke.blog.51cto.com
-Thank you for your reference. If you have any questions, you are welcome to communicate.
Catalogue
Noun interpretation
Brief introduction and version of HTTP Protocol
Request type of HTTP
HTTP protocol message
Request and response message format
-- request method
-- HTTP return status code
-- introduction to HTTP
-- Common MIME types
The specific process of a web resource request
Basic steps for clients (browsers) to request data from the server
HTTP receives concurrent requests from multiple users
Cookie process
Bag grabbing tools and commands
-- Sniffer
-- Wireshark
-- Curl
I. interpretation of nouns
II. Brief introduction and version of HTTP protocol
1. Brief introduction of HTTP protocol
HTTP (Hyper Text Transfer Protocol Hypertext transfer Protocol):
It is one of the most widely used network protocols on the Internet, which is mainly used for Web services. The text information is processed by computer and the format is HTML (Hyper Text Mark Language) hypertext markup language.
2. HTTP protocol version
3. The request type of HTTP
1. Static (edited and defined in advance)
1) first, the web server registers socket with the kernel (socket, listening for browser requests)
2) the client initiates a request request to the web server through the browser
3) the Web server receives the request information from the client
4) if the resource requested by the user is local to the server, the http service will apply for a call from the system kernel
5) the kernel calls the data on the local disk and sends the data to the http service
6) http sends the resources requested by the user to the client through the response message.
two。 Dynamic (a program written in a programming language and then output in html format)
Dynamic is similar to static, except that there is one more step in the middle to invoke the back-end interpreter, which sets the
The data is generated into a file in html format, then built into a response message, and finally returned to the client.
4. HTTP protocol message
1. Request method
2. HTTP return status code
3. Introduction to HTTP
4. Common MIME types
5. The specific process of a web resource request
VI. Basic steps for the client (browser) to request data from the server
The user initiates a http request, and the cache fetches the URL, depending on the URL to find out if there is a matching copy, which may be in memory or on the local disk.
If the request hits the local cache, get a "copy" of the corresponding resource from the local cache.
Check whether the "copy" expires, otherwise return directly, and yes, continue to forward the request to the server. In HTTP, the expiration time of the document is specified by the Cache-Control header and the Expires header. By judging the expiration time, the cache can know whether the document is within the expiration date. Both the Expires header and the Cache-Control:max-age header are used to tell the cache whether the document has expired, so why do you need two response headers to do this simple thing? In fact, all this is for historical reasons. Expires was first mentioned in HTTP 1.0 because it uses absolute dates, and if the server and client clocks are out of sync (which is actually very common), the cache may think that the document has passed its expiration date.
The server receives the request, then determines whether the resource has changed, and returns the new content, otherwise it returns 304: no change, update expiration time.
7. HTTP receives concurrent requests from multiple users
1. Apache
The default working model of Apache is blocking model. By default, only one request is received and processed at a time, which is generated by the main process.
The child process, and then when the main process receives the request, it is handed over to the child process for processing, so as to receive multi-user concurrent requests.
2. Nginx
The default working model of Nginx is a non-blocking model, and the number of working processes is specified through worker_processes, which defaults to 1, while
One process of nginx can handle multiple concurrent connection requests
VIII. Cookie process
The Web client sends a connection request to the Web server through the browser and opens a Web page through the URL in the HTTP message request line.
After receiving the request, the Web server generates a Set-Cookies Header based on the information provided by the client.
The generated Set-Cookies Header is stored in the HTTP message through Response Header and sent back to the Web client to establish a session connection.
After the Web client receives the HTTP reply message, if it wants to continue the established session, it will take out the contents of the Cookies from the HTTP message and form a Cookies text file to be stored in the hard disk of the client computer or in the memory of the client computer.
When the Web client sends a connection request to the Web server again, the Web browser first looks for the corresponding Cookies text file on the local computer or the corresponding Cookies content in the memory of the local computer according to the URL to visit the site. If found, the Cookies content is stored in a HTTP request message and sent to the Web server.
After receiving the HTTP request containing Cookies content, the Web server retrieves the information related to the user in its Cookies, and generates a page response requested by the client and transmits it to the client according to the retrieval result.
IX. Bag grabbing tools and commands
Sniffer
L Sniffer, which can be translated as sniffer or packet capture software in Chinese, is a network analysis method based on the principle of passive interception. Using this technology, you can monitor the status of the network, the flow of data, and the information transmitted on the network.
L Sniffer program is a tool that uses the characteristics of Ethernet to set the network adapter card (NIC, usually Ethernet card) to promiscuous mode. Once the network card is set to this mode, it can receive every packet transmitted on the network.
Wireshark
L Wireshark (formerly known as Ethereal) is a network packet analysis software. The function of network packet analysis software is to capture network packets and show the most detailed network packet data as much as possible. Wireshark uses WinPCAP as the interface to exchange data messages directly with the network card.
L data analysis can be carried out through wireshark packets. It is a commonly used packet analysis tool that can be used to detect whether the server has any security risks. For example, whether the server field is answered in the response message, which specifies the program used by the server and its version. If the user knows this information, the user can carry out the analysis according to the vulnerabilities of the program and its version.
Curl
L curl is an open source file transfer tool that uses URL syntax to work on the command line. It is widely used in Unix, a variety of Linux distributions, and there are portable versions of DOS and Win32, Win64.
The l curl command is a file transfer tool that uses URL rules to work on the command line. It supports uploading and downloading of files, so it is an integrated transfer tool, but traditionally, curl is called a download tool.
As a powerful tool, curl supports HTTP, HTTPS, ftp and many other protocols, as well as POST, cookies, authentication, downloading some files from the specified offset, user agent string, speed limit, file size, progress bar and other features.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.