http协议详解

更新时间:2023-09-01 21:39:01 阅读量: 教育文库 文档下载

说明:文章内容仅供预览,部分内容可能不全。下载后的文档,内容与下面显示的完全一致。下载之前请确认下面内容是否您想要的,是否完整无缺。

介绍了http协议的相关内容

HTTP

http://www.77cn.com.cn/gueter/archive/2007/03/08/1524447.aspx

Author :Jeffrey

HTTP 1990 WWW HTTP/1.0 HTTP/1.1 HTTP-NG(Next Generation of HTTP)

HTTP

1. /

2. GET HEAD POST HTTP HTTP

3. HTTP Content-Type

4.

5. HTTP

HTTP URL

http TCP HTTP1.1 Web HTTP Web

HTTP URL (URL URI ) http://host[":"port][abs_path]

http HTTP host Internet IP port 80 abs_path URI URL abs_path URI “/

eg:

1 http://www.77cn.com.cn

http://www.77cn.com.cn/

2 http:192.168.0.116:8080/index.jsp

介绍了http协议的相关内容

HTTP

http

1 URI Method Request-URI HTTP-Version CRLF

Method Request-URI HTTP-Version HTTP CRLF CRLF CR LF

GET Request-URI

POST Request-URI

HEAD Request-URI

PUT Request-URI

DELETE Request-URI

TRACE

CONNECT

OPTIONS

GET GET eg:GET /form.html HTTP/1.1 (CRLF)

POST

eg POST /reg.jsp HTTP/ (CRLF)

Accept:image/gif,image/x-xbit,... (CRLF)

...

HOST:http://www.77cn.com.cn (CRLF)

Content-Length:22 (CRLF)

Connection:Keep-Alive (CRLF)

Cache-Control:no-cache (CRLF)

(CRLF) // CRLF

user=jeffrey&pwd=1234 //

HEAD GET HEAD HTTP GET Request-URI

2

3 ( )

介绍了http协议的相关内容

HTTP

HTTP

HTTP

1

HTTP-Version Status-Code Reason-Phrase CRLF

HTTP-Version HTTP Status-Code Reason-Phrase

1xx --

2xx --

3xx --

4xx --

5xx --

200O K //

400 Bad Request //

401 Unauthorized // WWW-Authenticate 403 Forbidden //

404 Not Found // eg URL

500 Internal Server Error //

503 Server Unavailable // eg HTTP/1.1 200 OK CRLF

2

3

HTTP

HTTP CRLF

HTTP

+ ”+ +

1

介绍了http协议的相关内容

eg

Cache-Control HTTP1.0 Pragma

no-cache no-store max-age max-stale min-fresh only-if-cached;

public private no-cache no-store no-transform must-revalidate proxy-revalidate max-age s-maxage.

eg IE JSP response.sehHeader("Cache-Control","no-cache");

//response.setHeader("Pragma","no-cache"); //

Cache-Control:no-cache

Date

Connection “close”

2

Accept

Accept eg Accept image/gif GIF Accept text/html html Accept-Charset

Accept-Charset eg Accept-Charset:iso-8859-1,gb2312.

Accept-Encoding

Accept-Encoding Accept eg Accept-Encoding:gzip.deflate.

Accept-Language

Accept-Language Accept eg Accept-Language:zh-cn.

Authorization

Authorization 401 Authorization

Host

Host Internet HTTP URL eg

介绍了http协议的相关内容

http://www.77cn.com.cn/index.html

Host

Host http://www.77cn.com.cn

80 Host http://www.77cn.com.cn: User-Agent

User-Agent User-Agent User-Agent

GET /form.html HTTP/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,05 Jan 2007 11:21:25 GMT (CRLF)

If-None-Match:W/"80b1a4c018f3c41:8317" (CRLF)

User-Agent:Mozilla/4.0(compatible;MSIE6.0;Windows NT 5.0) (CRLF)

Host:http://www.77cn.com.cn (CRLF)

Connection:Keep-Alive (CRLF)

(CRLF)

3

Request-URI

Location

Location Location

Server

Server User-Agent

Server

Server Apache-Coyote/1.1

WWW-Authenticate

WWW-Authenticate 401 401 Authorization

eg WWW-Authenticate:Basic realm="Basic Auth Test!" //

介绍了http协议的相关内容

4

eg

Content-Encoding

Content-Encoding Content-Type Content-Encoding eg Content-Encoding gzip Content-Language

Content-Language

eg Content-Language:da

Content-Length

Content-Length Content-Type

Content-Type eg

Content-Type:text/html;charset=ISO-8859-1

Content-Type:text/html;charset=GB2312

Last-Modified

Last-Modified

Expires

Expires ( ) Expires eg Expires Thu 15 Sep 2006 16:23:12 GMT

HTTP1.1 0 eg Expires 0 jsp response.setDateHeader("Expires","0");

telnet http

MS telnet http telnet http

1 telnet

1.1 telnet

-->cmd-->telnet

介绍了http协议的相关内容

1.2 telnet

set localecho

2

2.1 open http://www.77cn.com.cn 80 //

HEAD /index.asp HTTP/1.0

Host:http://www.77cn.com.cn

/* , , */

open http://www.77cn.com.cn 80

GET/ index.aspH TTP/1.0 //

Host:http://www.77cn.com.cn

2.2 open http://www.77cn.com.cn 80 // telnet http://www.77cn.com.cn 80 HEAD /index.asp HTTP/1.0

Host:http://www.77cn.com.cn

3

3.1 2.1 :

HTTP/1.12 00O K //

Server:M icrosoft-IIS/5.0 //web

Date: Thu,08 Mar 200707:17:51 GMT

Connection:K eep-Alive

Content-Length: 23330

Content-Type: text/html

Expries: Thu,08 Mar 2007 07:16:51 GMT

Set-Cookie: ASPSESSIONIDQAQBQQQB=BEJCDGKADEDJKLKKAJEOIMMH; path=/

Cache-control: private

//

3.2 2.2 :

HTTP/1.04 04N otF ound //

Date: Thu, 08 Mar 2007 07:50:50 GMT

Server: Apache/2.0.54 <Unix>

Last-Modified: Thu, 30 Nov 2006 11:35:41 GMT

ETag: "6277a-415-e7c76980"

介绍了http协议的相关内容

Accept-Ranges: bytes

X-Powered-By: mod_xlayout_jh/0.0.1vhs.markII.remix

Vary: Accept-Encoding

Content-Type: text/html

X-Cache: MISS from http://www.77cn.com.cn

Via: 1.0 http://www.77cn.com.cn:80<squid/2.6.STABLES-20061207>

X-Cache: MISS from http://www.77cn.com.cn

Connection: close

...

4 . 1

2

3 HTTP RFC2616 http://www.77cn.com.cn/rfc

4 http

HTTP

1

FTP SMTP DNS NNTP HTTP

(Proxy) (Gateway) (Tunnel) URI URI ( )

(Proxy) (Gateway)

HTTP

(Tunnel) HTTP HTTP (Portal) (Intermediary)

介绍了http协议的相关内容

2 —HTTP

HTTP 80 3128 8080 network port

3 HTTP Content Lenth

POST ContentLenth ContentLenth:999999999 WEB WEB http://www.77cn.com.cn/Class/HTTP/0532918532667330.html

4 HTTP

TCP SYNFlood SYN

Smurf TearDrop ICMP Flood IP

19 Chargen Chargen_Denial_of_Service Chargen UDP DOWN WEB 2 1. Chargen 2. HTTP

IP N Chargen Connect Chargen 72

5 Http

Http Http .Http TCP/IP , Http Http , TCP/IP , .

Banner , Apache Http , Banner , Http Http IIS Netscape, Banner Dll , , , . Banner

1 HEAD/Http/1.0 Http

2 DELETE/Http/1.0 , Delete

3 GET/Http/3.0 Http

4 GET/JUNK/1.0 Http

Http Httprint, , , Http . Http

6

HTTP1.1 HTTP HTTP-NG

介绍了http协议的相关内容

本文来源:https://www.bwwdw.com/article/y4bi.html

Top