您好,欢迎访问三七文档
HTTPHTTP1990(NextGenerationofHTTP)HTTP1./2.GETHEADPOSTHTTPHTTP3.HTTPContent-Type4.5.HTTPHTTPURLhttpTCPHTTP1.1WebHTTPWebHTTPURL(URLURI)[:port][abs_path]httpHTTPhostInternetIPport80abs_pathURIURLabs_pathURI“/”eg:1:192.168.0.116:8080/index.jspHTTPhttp1URIMethodRequest-URIHTTP-VersionCRLFMethodRequest-URIHTTP-VersionHTTPCRLFCRLFCRLFGETRequest-URIPOSTRequest-URIHEADRequest-URIPUTRequest-URIDELETERequest-URITRACECONNECTOPTIONSGETGETeg:GET/form.htmlHTTP/1.1(CRLF)POSTegPOST/reg.jspHTTP/(CRLF)Accept:image/gif,image/x-xbit,...(CRLF)...HOST:(CRLF)Content-Length:22(CRLF)Connection:Keep-Alive(CRLF)Cache-Control:no-cache(CRLF)(CRLF)//CRLFuser=jeffrey&pwd=1234//HEADGETHEADHTTPGETRequest-URI23()HTTPHTTPHTTP1HTTP-VersionStatus-CodeReason-PhraseCRLFHTTP-VersionHTTPStatus-CodeReason-Phrase1xx--2xx--3xx--4xx--5xx--200OK//400BadRequest//401Unauthorized//“”++1egCache-ControlHTTP1.0Pragmano-cacheno-storemax-agemax-stalemin-freshonly-if-cached;publicprivateno-cacheno-storeno-transformmust-revalidateproxy-revalidatemax-ages-maxage.egIEJSPresponse.sehHeader(Cache-Control,no-cache);//response.setHeader(Pragma,no-cache);//Cache-Control:no-cacheDateConnection“close”2AcceptAcceptegAcceptimage/gifGIFAccepttext/htmlhtmlAccept-CharsetAccept-CharsetegAccept-Charset:iso-8859-1,gb2312.Accept-EncodingAccept-EncodingAcceptegAccept-Encoding:gzip.deflate.Accept-LanguageAccept-LanguageAcceptegAccept-Language:zh-cn.AuthorizationAuthorization401AuthorizationHostHostInternetHTTPURLeg:User-AgentUser-AgentUser-AgentUser-AgentGET/form.htmlHTTP/1.1(CRLF)Accept:image/gif,image/x-xbitmap,image/jpeg,application/x-shockwave-flash,application/vnd.ms-excel,application/vnd.ms-powerpoint,application/msword,*/*(CRLF)Accept-Language:zh-cn(CRLF)Accept-Encoding:gzip,deflate(CRLF)If-Modified-Since:Wed,05Jan200711:21:25GMT(CRLF)If-None-Match:W/80b1a4c018f3c41:8317(CRLF)User-Agent:Mozilla/4.0(compatible;MSIE6.0;WindowsNT5.0)(CRLF)Host:(CRLF)Connection:Keep-Alive(CRLF)(CRLF)3Request-URILocationLocationLocationServerServerUser-AgentServerServerApache-Coyote/1.1=BasicAuthTest!//4egContent-EncodingContent-EncodingContent-TypeContent-EncodingegContent-EncodinggzipContent-LanguageContent-LanguageegContent-Language:daContent-LengthContent-LengthContent-TypeContent-TypeegContent-Type:text/html;charset=ISO-8859-1Content-Type:text/html;charset=GB2312Last-ModifiedLast-ModifiedExpiresExpires()ExpiresegExpiresThu15Sep200616:23:12GMTHTTP1.10egExpires0jspresponse.setDateHeader(Expires,0);telnethttpMStelnethttptelnethttp1telnet1.1telnet--cmd--telnet1.2telnetsetlocalecho22.1open:*,,*/open:::Microsoft-IIS/5.0//webDate:Thu,08Mar200707:17:51GMTConnection:Keep-AliveContent-Length:23330Content-Type:text/htmlExpries:Thu,08Mar200707:16:51GMTSet-Cookie:ASPSESSIONIDQAQBQQQB=BEJCDGKADEDJKLKKAJEOIMMH;path=/Cache-control:private//3.22.2:HTTP/1.0404NotFound//Date:Thu,08Mar200707:50:50GMTServer:Apache/2.0.54UnixLast-Modified:Thu,30Nov200611:35:41GMTETag:6277a-415-e7c76980Accept-Ranges:bytesX-Powered-By:mod_xlayout_jh/0.0.1vhs.markII.remixVary:Accept-EncodingContent-Type:text/htmlX-Cache:MISSfromzjm152-78.sina.com.cnVia:1.0zjm152-78.sina.com.cn:80squid/2.6.STABLES-20061207X-Cache:MISSfromth-143.sina.com.cnConnection:close...4.123HTTPRFC2616(Proxy)(Gateway)(Tunnel)URIURI()(Proxy)(Gateway)HTTP(Tunnel)HTTPHTTP(Portal)(Intermediary)2—HTTPHTTP8031288080networkport3HTTPContentLenthPOSTContentLenthContentLenth:999999999WEBWEB“”19ChargenChargen_Denial_of_ServiceChargenUDPDOWNWEB21.Chargen2.HTTPIPNChargenConnectChargen725HttpHttpHttp.HttpTCP/IP,HttpHttp,TCP/IP,.Banner,ApacheHttp,Banner,HttpHttpIISNetscape,BannerDll,,,.Banner1HEAD/Http/1.0Http2DELETE/Http/1.0,Delete3GET/Http/3.0Http4GET/JUNK/1.0HttpHttpHttprint,,,Http.Http6HTTP1.1HTTPHTTP-NG
本文标题:HTTP协议详解
链接地址:https://www.777doc.com/doc-7018810 .html