telnetでHTTP通信

赤の太字が入力内容。
残りがサーバからの応答。

$ telnet
telnet> open http://www.amazon.co.jp 80
Trying 207.171.181.135…
Connected to http://www.amazon.co.jp.
Escape character is ‘^]’.

HEAD / HTTP/1.1
Host: http://www.amazon.co.jp

HTTP/1.1 200 OK
Date: Sun, 02 Aug 2009 09:34:07 GMT
Server: Server
Set-Cookie: skin=noskin; path=/; domain=.amazon.co.jp; expires=Sun, 02-Aug-2009 09:34:07 GMT
x-amz-id-1: 1DZ1F99JGC5TBGT2Z0E9
x-amz-id-2: d8RIZBgRlRHYOHTlsfvDJvt2osHikE96Qet3aJTqauQ=
Vary: Accept-Encoding,User-Agent
Content-Type: text/html; charset=Shift_JIS
Set-cookie: session-id-time=1249743600l; path=/; domain=.amazon.co.jp; expires=Sat Aug 08 15:00:00 2009 GMT
Set-cookie: session-id=375-5057888-0092864; path=/; domain=.amazon.co.jp; expires=Sat Aug 08 15:00:00 2009 GMT

GET / HTTP/1.1
Host: http://www.amazon.co.jp

… (HTML)

<CTRL>+]
終了

Advertisements
Tagged with: ,
Posted in tip, web

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Archives

Error: Twitter did not respond. Please wait a few minutes and refresh this page.

%d bloggers like this: