[1] [[開始行]]は、 [[HTTPメッセージ]]の最初の行です。

* 仕様書

[REFS[
- [2] [CITE@en[RFC 7230 - Hypertext Transfer Protocol (HTTP/1.1): Message Syntax and Routing]] ([TIME[2014-06-07 01:59:35 +09:00]] 版) <https://tools.ietf.org/html/rfc7230#section-3.1>
]REFS]

* 構文

[3] [[開始行]]は、[[要求行]]または[[状態行]]のいずれかです [SRC[>>2]]。

* 文脈

[6] [[HTTPメッセージ]]には[[開始行]]が必ずあります。

[7] ただし[[HTTP/0.9]] [[応答]]には[[開始行]]はありません。

* 関連

[4] [[要求行]]がある[[メッセージ]]は[[要求メッセージ]]で、
[[状態行]]がある[[メッセージ]]は[[応答メッセージ]]です。

[5] 理論上 [SRC[>>2]] [[鯖]]も[[クライアント]]も[[要求行]]と[[状態行]]のどちらも受け取り得ることとなっています。
両者は構文的に曖昧無く区別できます。しかし実際上は[[鯖]]が受け取るのは[[要求行]]、
[[クライアント]]が受け取るのは[[状態行]]であり、そうでない[[メッセージ]]は[[非妥当]]とみなされます。

[8] [[HTTP/2]] では、[[疑似ヘッダー]]が[[開始行]]の役割を果たしています。

[9] [CITE@en[869725 – support shoutcast streams]]
([TIME[2017-01-22 13:24:38 +09:00]])
<https://bugzilla.mozilla.org/show_bug.cgi?id=869725>

[FIG(quote)[
[FIGCAPTION[
[10] [CITE[CURLOPT_HTTP200ALIASES]]
([TIME[2017-01-14 00:45:06 +09:00]])
<https://curl.haxx.se/libcurl/c/CURLOPT_HTTP200ALIASES.html>
]FIGCAPTION]

> Pass a pointer to a linked list of aliases to be treated as valid HTTP 200 responses. Some servers respond with a custom header response line. For example, SHOUTcast servers respond with "ICY 200 OK". Also some very old Icecast 1.3.x servers will respond like that for certain user agent headers or in absence of such. By including this string in your list of aliases, the response will be treated as a valid HTTP header line such as "HTTP/1.0 200 OK".

]FIG]


[FIG(quote)[
[FIGCAPTION[
[11] [CITE[Missing HTTP reason phrase - Google グループ]]
([TIME[2017-06-07 13:51:18 +09:00]])
<https://groups.google.com/forum/#!topic/rack-devel/KfNmEQpOZI0/discussion>
]FIGCAPTION]

> I was debugging a problem that our Rails app wasn't sending the HTTP
> reason phrase in the response, which causes problems in a J2ME HTTP
> client.
> (responding with "HTTP/1.1 200" instead of "HTTP/1.1 200 OK")

]FIG]
