telnetじゃなくてw3mを使えと言われた話
慣れないtelnetを使ってレスポンスヘッダを確認しようとして「あれー、ついてないぞ?」となった。
$ telnet localhost 8101 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /static/t <html> <h1>hello</h1> Connection closed by foreign host.
正解はこうだった。
$ telnet localhost 8101 Trying 127.0.0.1... Connected to localhost. Escape character is '^]'. GET /static/t HTTP/1.0 HTTP/1.0 200 OK Content-Type: application/octet-stream Last-Modified: Wed, 22 Feb 2012 02:35:07 GMT Cache-Control: public, max-age=43200 Expires: Wed, 22 Feb 2012 15:32:25 GMT ETag: "flask-1329878107.0-21-3285584883" Date: Wed, 22 Feb 2012 03:32:25 GMT Content-Length: 21 Server: Werkzeug/0.8.3 Python/2.7.2 <html> <h1>hello</h1> Connection closed by foreign host.
だけど「telnetとかだるい、w3m使えばいいじゃん」と言わたのでメモ
$ w3m -dump_both http://localhost:8101/static/t HTTP/1.0 200 OK Content-Type: application/octet-stream Last-Modified: Wed, 22 Feb 2012 02:35:07 GMT Cache-Control: public, max-age=43200 Expires: Wed, 22 Feb 2012 15:33:56 GMT ETag: "flask-1329878107.0-21-3285584883" Date: Wed, 22 Feb 2012 03:33:56 GMT Content-Length: 21 Server: Werkzeug/0.8.3 Python/2.7.2 <html> <h1>hello</h1>