HTTP 协议 —— 简介
以前我以为HTTP协议是加了密的,现在才知道HTTP是以明文方式发送数据的。 HTTP(Hypertext Transfer Protocol, 超文本传输协议),用于从WWW服务器传输 超文本到本地浏览器的传输协议。你可以通过协议定制传送的内容,从而减少网络 传输。HTTP协议是以TCP/IP为基础的高层协议。现在广泛使用的版本HTTP/1.1。 HTTP协议基于请求/响应模式(Request/Response).客户与服务器建立连接后,按 照协议规定格式,发送请求到服务器,客户得到请求后,返回响应信息给客户。 HTTP使用的端口号,通常为80。 关于HTTP的协议具体内容,网上很多,不再多说,参照相应得文档。下一篇文 章我会用 C++ 做一个 http协议的简单实现。
相关链接: 中国协议分析网: http://www.cnpaf.net/ 所有的协议标准: http://www.cis.ohio-state.edu/rfc/
H1. HTTP协议状态码的含义
号码 含义 ----------------------------------------- "100" : Continue "101" : witching Protocols "200" : OK "201" : Created "202" : Accepted "203" : Non-Authoritative Information "204" : No Content "205" : Reset Content "206" : Partial Content "300" : Multiple Choices "301" : Moved Permanently "302" : Found "303" : See Other "304" : Not Modified "305" : Use Proxy "307" : Temporary Redirect "400" : Bad Request "401" : Unauthorized "402" : Payment Required "403" : Forbidden "404" : Not Found "405" : Method Not Allowed "406" : Not Acceptable "407" : Proxy Authentication Required "408" : Request Time-out "409" : Conflict "410" : Gone "411" : Length Required "412" : Precondition Failed "413" : Request Entity Too Large "414" : Request-URI Too Large "415" : Unsupported Media Type "416" : Requested range not satisfiable "417" : Expectation Failed "500" : Internal Server Error "501" : Not Implemented "502" : Bad Gateway "503" : Service Unavailable "504" : Gateway Time-out "505" : HTTP Version not supported

|