telnetをブラウザとして利用 | Web Technique Last modified : 2000/09/21 |
# telnet localhost http Trying 127.0.0.1... Connected to localhost.xxx.co.jp. Escape character is '^]'. HEAD / HTTP/1.0 ← 入力 ← 改行のみ HTTP/1.1 200 OK Date: Mon, 27 Mar 2000 05:32:54 GMT Server: Apache/1.3.9 (Unix) PHP/3.0.12 mod_ssl/2.4.10 OpenSSL/0.9.4 Last-Modified: Mon, 27 Mar 2000 05:20:16 GMT ETag: "f433c-a71-38deef90" Accept-Ranges: bytes Content-Length: 2673 Connection: close Content-Type: text/html Connection closed by foreign host. |
# telnet localhost 80 GET /cgi-bin/test.cgi?name=v1&name2=v2 HTTP/1.0 ← 入力 ← 改行のみ |
# telnet localhost 80 POST /cgi-bin/test.cgi HTTP/1.0← 入力 Content-Length:16← 入力 ← 改行のみ name=v1&name2=v2← 入力 |
# telnet extra 8080 GET / HTTP/1.1← 入力 HOST: extra← サーバ名又は、IPアドレスを入力 ← 改行のみ HTTP/1.1 200 OK Date: Wed, 17 May 2000 07:39:26 GMT Server: Apache/1.3.9 (Unix) Last-Modified: Fri, 12 May 2000 07:24:23 GMT ETag: "2aaa3-8b8-391bb1a7" Accept-Ranges: bytes Content-Length: 2232ファイルのバイト数 Content-Type: text/html <HTML> ... </HTML>しばらくして、5秒ぐらいでコネクションが切れる Connection closed by foreign host. |