In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-20 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >
Share
Shulou(Shulou.com)06/03 Report--
Simple and fast
HTTP is an object-oriented protocol that belongs to the application layer and is suitable for distributed hypermedia information systems due to its mode. It was put forward in 1990 and has been continuously improved and expanded after several years of use and development. Version 6 of HTTP/1.0 is currently in use in the WWW,
Standardization of HTTP/1.1 is ongoing, and proposals for HTTP-NG(Next Generation of HTTP) have been made.
The main features of HTTP can be summarized as follows:
1. Support client/server model.
2. Simple and fast: When a client requests a service from a server, it simply transmits the request method and path. Common request methods are GET, HEAD, POST. Each method specifies a different type of client-server contact. Because HTTP protocol is simple, the program size of HTTP server is small, so the communication speed is very fast.
3. Flexible: HTTP allows transmission of arbitrary types of data objects. The type being transmitted is marked by Content-Type.
4. Connectionless: Connectionless means limiting each connection to one request. After the server processes the client's request and receives the client's response, the connection is disconnected. In this way transmission time can be saved.
5. Stateless: HTTP is a stateless protocol. Stateless means that the protocol has no memory for transactions. The lack of state means that if the preceding information is needed for subsequent processing, it must be retransmitted, which can lead to an increase in the amount of data transmitted per connection. On the other hand, the server responds faster when it does not need previous information.
Notes:
object-oriented: everything is an object (you can dissect everything as an object)
For example, consider a cup as an object.
This cup has state, volume, material and so on. these cups
The property of the cup is called the property of the cup)
http-hg: abbreviation for hypermedia information system
GET, HEAD, POST: get and post distinguish one from the other
Head and get almost the same attention do not understand Baidu.
Content-Type: content type, generally refers to the Content-Type existing in the web page, used to define the type of network file and the encoding of the web page, determine what form and encoding the file receiver will read, which is often seen in some Asp web page click results are downloaded to a file or a picture of the reason.
Relative paths and absolute paths: for example, C:\users\mydyn\documents\Chen Yuezhen.doc
If you want to see this file Chen Yuezhen.doc, this is called absolute path.
When I'm already under C:\users\mydyn, I just type documents\Chen Yuezhen.doc and I can find it.
It's called a relative path.
And if I type C:\...\...\ Documents\Chen Yuezhen.doc Can you find what it found?
The middle part I used...\ Let the computer directly search the whole directory, so that you can also find and the absolute path is fixed C:\users\mydyn\documents\Chen Yuezhen.doc You can see what is the relative path and absolute path by comparing it.
1. Detailed explanation of HTTP protocol URL
HTTP (Hypertext Transfer Protocol) is a stateless, application-layer protocol based on a request-and-response model.
TCP based connection mode, HTTP 1.1 version gives a persistent connection mechanism, the vast majority of Web open
All are Web applications built on top of HTTP protocol.
The format of an HTTP URL (URL is a special type of URI that contains enough information to find a resource)
http://host[":"port[abs_path]
Note: Difference between URL and URI:
http:\\www.chenyuezhen\dyn\erzi.com
Well, the above comprehensive URL
URL can also be written like this: http:\\www.chenyuezhen: 80\dyn\erzi.com
Compare the format above http://host[":"port[abs_path]
Know what?
dyn\erzi called URI
http means to locate network resources through HTTP protocol;host means legitimate Internet host domain name or IP
address;port Specifies a port number, null uses the default port 80;abs_path Specifies the URI of the requested resource;
If abs_path is not given in the URL, it must be given as a "/" when it is used as a request URI,
Usually this job is done automatically by the browser.
eg: 1. Input: www.guet.edu.cn
Browser automatically converted to: www.guet.edu.cn/ 2, http: 192.168.0.116:8080/index.jsp
2. HTTP Protocol Detailed Explanation Request
http request consists of three parts: request line, message header and request body
The request line begins with a method symbol separated by spaces, followed by the URI of the request and the version of the protocol, in the following format: Method Request-URI HTTP-Version CRLF
where Method represents the request method;Request-URI is a uniform resource identifier;HTTP-Version table
Indicates the HTTP protocol version of the request;CRLF indicates carriage return and line feed (no separate CR or LF characters are allowed except CRLF at the end).
There are many ways to request (all in caps), each explained as follows:
GET request gets the resource identified by Request-URI
POST appends new data to the resource identified by the Request-URI
HEAD Response message header requesting to get the resource identified by Request-URI
PUT requests that the server store a resource and use the Request-URI as its identifier
Deleting requests the server to delete the resource identified by the Request-URI
TRACE request server sends back the received request information, mainly for testing or diagnosis
CONNECT Reserved for future use
OPTIONS Requests query server performance, or query resource-related options and requirements Examples of applications:
GET method: When accessing a web page by entering a URL in the address bar of the browser, the browser uses GET method to obtain resources from the server, eg: GET/form.html HTTP/1.1 (CRLF)
POST requires the requested server to accept data attached to the request, and is often used to submit forms. eg:POST /reg.jsp HTTP/ (CRLF)
Accept:p_w_picpath/gif,p_w_picpath/x-xbit,... (CRLF)
...
HOST:www.guet.edu.cn (CRLF)
Content-Length:22 (CRLF)
Connection:Keep-Alive (CRLF)
Cache-Control:no-cache (CRLF)
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.