水無月ばけらのえび日記

bakera.jp > 水無月ばけらのえび日記 > HTTP/1.1 の Status-Line の仕様

HTTP/1.1 の Status-Line の仕様

2006年8月23日(水曜日)

HTTP/1.1 の Status-Line の仕様

何となくメモしておきますが、RFC2616では、

Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF

Reason-Phrase = *<TEXT, excluding CR, LF>

TEXT = <any OCTET except CTLs, but including LWS>

なので、Reason-Phraee には制御コードを除く任意の文字が使用できます。また、RFC2616 に例示されている Reson-Phrase は

The reason phrases listed here are only recommendations -- they MAY be replaced by local equivalents without affecting the protocol.

とされていますから、好きなフレーズを使うことができます。つまり、

Status: 200 <marquee>OK</marquee>

のようなものも正当な HTTP 応答だということです。

関連する話題: Web / HTTP / セキュリティ / RFC

最近の日記

関わった本など