Preliminary Research on http protocol

Source: Internet
Author: User

Preliminary Research on http protocol

Recently, I have been using programs for downloading http web pages and files for many times. I was suddenly interested in the principle of the program and happened to see the socket-based http protocol, which made me very excited. After all, it took a long time to get in touch with the practical underlying protocol of socket and practice it in a small chat room. However, I don't know what specific examples in my life are completed by socket.
After reading various notes and documents, coupled with a code experiment, I finally got a preliminary idea of how to use this protocol.
The Protocol is divided into two parts: one is sent to the http server, calledRequest HeaderOne is received from there, and there will be a string before the official data, called the response header.
The two have their own formats. The specific parameter list and explanations are not written here. Here are some interesting things you may encounter.
1. Request Header "GET/\ r \ n"
In this way, the data body is directly obtained without feedback to the response header.
2. The request headers http1.0 and 1.1
In principle, 1.1 is better than 1.0 protocol, but in my actual use process, 1.0 gets feedback faster, and 1.1 takes several seconds to get feedback. Note: The test environment is the same.

Related Article

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.