HTTP ヘッダ

[サーバの実験室 基礎]

作成 : 2003/03/18

"サーバの実験室"の検索


tcpdump で HTTP ヘッダを見る

tcpdump を使用して HTTP ヘッダを見るには、次のようにする。 -s(snaplen)は適当な数値を指定しておく。

# tcpdump -X -s 500 host webserver port 80

IE 6.0 <---> Apache Web サーバ [HTTP/1.1]

リクエストヘッダ

GET http://www.example.com/ HTTP/1.1
Accept: */*
Accept-Language: ja
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
Host: www.example.com
Connection: Keep-Alive

レスポンスヘッダ

HTTP/1.1 200 OK
Date: Mon, 10 Mar 2003 07:40:13 GMT
Server: Apache
Last-Modified: Mon, 10 Mar 07:37:57 GMT
ETag: "62eab-59-3e6c40d5"
Accept-Ranges: bytes
Content-Length: 89
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=euc-jp

IE 6.0 <---> Apache Web サーバ [HTTP/1.0]

リクエストヘッダ

GET http://www.example.com/ HTTP/1.0
Accept: */*
Accept-Language: ja
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
Host: www.example.com
Connection: Keep-Alive

レスポンスヘッダ

HTTP/1.1 200 OK
Date: Mon, 10 Mar 2003 07:40:13 GMT
Server: Apache
Last-Modified: Mon, 10 Mar 07:37:57 GMT
ETag: "62eab-59-3e6c40d5"
Accept-Ranges: bytes
Content-Length: 89
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=euc-jp

IE 6.0 <---> Apache Web サーバ [HTTP/1.1・Apache で Keep-Alive を使用しない設定]

リクエストヘッダ

GET http://www.example.com/ HTTP/1.1
Accept: */*
Accept-Language: ja
Accept-Encoding: gzip, deflate
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 4.0)
Host: www.example.com
Connection: Keep-Alive

レスポンスヘッダ

HTTP/1.1 200 OK
Date: Mon, 10 Mar 2003 07:40:13 GMT
Server: Apache
Last-Modified: Mon, 10 Mar 07:37:57 GMT
ETag: "62eab-59-3e6c40d5"
Accept-Ranges: bytes
Content-Length: 89
Connection: Close
Content-Type: text/html; charset=euc-jp

NN 7.1 <---> Apache Web サーバ [HTTP/1.1]

リクエストヘッダ

GET http://www.example.com/ HTTP/1.1
Host: www.example.com
User-Agent: Mozilla/5.0 (Windows; U; WinNT4.0; ja-JP; rv:1.0.2) Gecho/20021120 Netscape/7.01
Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,
  image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1
Accept-Language: ja
Accept-Encoding: gzip, deflate, compress;1=0.9
Accept-Charset: Shift_JIS, utf-8;q=0.66
Keep-Alive: 300
Connection: Keep-Alive

レスポンスヘッダ

HTTP/1.1 200 OK
Date: Mon, 10 Mar 2003 07:40:13 GMT
Server: Apache
Last-Modified: Mon, 10 Mar 07:37:57 GMT
ETag: "62eab-59-3e6c40d5"
Accept-Ranges: bytes
Content-Length: 89
Keep-Alive: timeout=15, max=100
Connection: Keep-Alive
Content-Type: text/html; charset=euc-jp

IE 6.0 <---> Squid Proxy サーバ [HTTP/1.1]

リクエストヘッダ

GET http://www.example.com/ HTTP/1.1
Accept: */*
Accept-Language: ja
Pragma: no-cache
User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows 98)
Host: www.example.com
Proxy-Connection: Keep-Alive

レスポンスヘッダ

HTTP/1.1 200 OK
Cache-Control: private
Content-Type: text/html
Server: GWS/2.0
Content-Length: 4131
X-Cache: MISS from proxy2.example.com
Age: 0
X-Cache: MISS from proxy1.example.com
Proxy-Connection: keep-alive

[サーバの実験室 基礎]