HTTP是应用层协议,同其他应用层协议一样,是为了实现某一类具体应用的协议,并由某一运行在用户空间的应用程序来实现某一类具体应用的协议,并由某一运行在用户空间的应用程序来实现其功能。HTTP是一种协议规范,这种规范记录在文档上,为真正通过HTTP协议进行通信的HTTP的实现程序。
0.9协议是适用于各种数据信息的简洁快速协议,但是远不能满足日益发展的各种应用的需要。0.9协议就是一个交换信息的无需协议,仅仅限于文字。由于无法进行内容的协商,在双方的握手和协议中,并有规定双发的内容是什么,也就是图片是无法显示和处理的。
1.0协议
到了1.0协议阶段,也就是在1982年,HTTP/1.0成为最重要的面向实务的应用层协议。该协议对每次请求/响应建立并拆除一次连接。其特点是简单易于管理,所以符合了大家的需要,得到了广泛的应用。
1.1协议
在1.0协议中,双方规定了连接方式和连接类型,这已经极大扩展了HTTP的领域,但对于互联网最重要的速度和效率,并没有太多的考虑。
2.0协议
(1)客户与服务器建立连接;
(2)客户向服务器提出请求;
(3)服务器接受请求,并根据请求返回相应的文件作为应答;
(4)客户与服务器关闭连接。
http的错误分为5类:
1xx:信息
2xx:成功
3xx:重定向
4xx:客户端错误
5xx:服务器错误