HTTP - oraccha/omicron GitHub Wiki

Hyper Text Transfer Protocol

  • HTTP/1.1 (RFC:2616)
    • [http://www.studyinghttp.net/rfc_ja/2616/rfc2616_ja.html 日本語訳]
  • Cookie (HTTP State Management Mechanism RFC:2965) . Cookie もヘッダとしてリクエスト/レスポンス時に授受される.
    • Cookie は REST じゃない HTTP 拡張になるらしい.

well-known port は 80 番. 最近は,何でも over HTTP でやるのが流行りらしい.


プロトコルのやりとりをのぞくには,wget --debug が便利.

バーチャルホスト

  • GET の後に Host: ヘッダを送る {{{ GET /index.html HTTP/1.1 Host: virtual.foo.com }}}

プロキシ

  • クライアント -> プロキシサーバへのリクエスト {{{ GET http://foo.com/index.html HTTP/1.1 Host: foo.com }}}

パーシステント(キープアライブ)コネクション

  • Apache (2.0.52-3.1) はデフォルトで無効.
  • クライアントは "Connection: Keep-Alive" を送る.サーバは,"Connection: Keep-Alive" もしくは "Connection: close" を返す.
  • wget でパーシステントコネクションが使えた場合は,"Registered fd 3 for persistent reuse." とか表示される.

リクエストのパイプライン化

  • [http://slashdot.jp/articles/06/12/20/0854256.shtml HTTPの同時接続数はどうあるべきか?] (SlashdotJapan 2006-12-20),[http://blog.livedoor.jp/dankogai/archives/50719947.html HTTPサーバーのパイプライン対応] (404 Blog Not Found 2006-12-21),[http://www.mozilla-japan.org/projects/netlib/http/pipelining-faq.html HTTP/1.1 パイプライン化 FAQ] (Mozilla)

いろんなサーバ実装

  • Apache

  • mhttpd

  • micro_httpd

  • [http://www.acme.com/software/thttpd/thttpd.html thttpd] . tiny/turbo/throttling HTTP server.

    • [http://www.onlamp.com/pub/a/bsd/2005/10/13/thttpd.html Lightweight Web Serving with thttpd] (ONLamp.com 2005-10-13)
  • [http://www.boa.org/ Boa] . single tasking HTTP server.

  • lighttpd

  • [http://www.hughes.com.au/products/libhttpd/ libhttpd]

  • [http://ooweb.sourceforge.net/ OOWeb]

  • [http://www.cherrypy.org/ CherryPy]

  • [http://www-06.ibm.com/jp/developerworks/web/library/wa-ltwebserv/index.shtml?ca=drs- 軽量Webサーバ] (IBM dW 2007-07-10)