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>+]
終了

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
  • RT @__apf__: How to write a research paper: a guide for software engineers & practitioners. docs.google.com/presentation/d… /cc @inwyrd 1 week ago
  • RT @HayatoChiba: 昔、自然と対話しながら数学に打ち込んだら何かを悟れるのではと思いたち、専門書1つだけ持ってパワースポットで名高い奈良の山奥に1週間籠ったことがある。しかし泊まった民宿にドカベンが全巻揃っていたため、水島新司と対話しただけで1週間過ぎた。 それ… 3 weeks ago
  • RT @googlecloud: Ever wonder what underwater fiber optic internet cables look like? Look no further than this deep dive w/ @NatAndLo: https… 3 weeks ago
  • @ijin UTC+01:00 な時間帯で生活しています、、、 6 months ago
  • RT @mattcutts: Google's world-class Site Reliability Engineering team wrote a new book: amazon.com/Site-Reliabili… It's about managing produc… 9 months ago
%d bloggers like this: