[11] CGI応答で使われるCGI欄 Status:
は、
応答の状態符号を指定します。
[12] この欄の値の構文は次のように定義されています >>10。
Status = "Status:" status-code SP reason-phrase NL status-code = "200" | "302" | "400" | "501" | extension-code extension-code = 3digit reason-phrase = *TEXT
[14] この欄には HTTP 状態符号と、それに併記する事由を指定します。
[16] Status:
欄は局所リダイレクト応答では使えませんが、それ以外のCGI応答で使うことができます。
[17] この欄の値が不適切なときの鯖の処理は明記されていません。
[18] この欄の値は必ずしもスクリプトの誤りの状況でなくても構いません。例えば、鯖の誤りの処理のために CGIスクリプトが呼ばれている場合、その鯖の誤りの状況を説明する状態符号を使うべきです。 >>10
The "Status" header field is used to indicate to the server what status code the server MUST use in the response message.
"Status" 頭欄はサーバーがどの状態符号を応答メッセージに使わなければならない かをサーバーに示すのに使います。
Status = "Status" ":" digit digit digit SP reason-phrase NL reason-phrase = *<CHAR, excluding CTLs, NL>
The valid status codes are listed in section 6.1.1 of the HTTP/1.0 specifications [3]. If the SERVER_PROTOCOL is "HTTP/1.1", then the status codes defined in the HTTP/1.1 specification [8] may be used. If the script does not return a "Status" header field, then "200 OK" SHOULD be assumed by the server.
妥当な状態符号は HTTP/1.0 仕様書の 6.1.1節に列挙されています。 SERVER_PROTOCOL が "HTTP/1.1" の場合、状態符号は HTTP/1.1 で定義されているものを使って構いません。 Script が "Status" 頭欄を返さない場合は、 "200 OK" がサーバーにより 仮定されるべきです。
If a script is being used to handle a particular error or condition encountered by the server, such as a '404 Not Found' error, the script SHOULD use the "Status" CGI header field to propagate the error condition back to the client. E.g., in the example mentioned it SHOULD include a "Status: 404 Not Found" in the header data returned to the server.
Script がサーバーの遭遇した特定の誤り又は状態, 例えば「404 Not Found」誤りを取り扱うのに使われる場合、 script は顧客に誤り状態を伝えるために "Status" CGI 頭欄を使うべきです。 例えばこの例では、サーバーに返される頭データに "Status: 404 Not Found" を含めるべきです。
HTTP応答の staus-line では Reason-Phrase は OCTET - CTL + LWS - CR - LF で定義されているのですが、 CGI/1.1 では CHAR - CTL ですから、 CGI の方が使える文字が少ないことになります。
参考までに、
です。が、 SIP-CGI に Status: 欄はありません。
[19] 元々 CGI で実装されていて、その後それ以外の API に移行した Webアプリケーションで、
あるいはその他の理由で正常に動作していないWebアプリケーションで、
Status:
欄が処理されずにHTTP 応答に含まれることもあります。
[20] Apache は CGI だけでなく、 send-as-is でも Status:
欄を解釈するようです。
[21] RFC 4975 - The Message Session Relay Protocol (MSRP) ( ( 版)) <http://tools.ietf.org/html/rfc4975#page-37>
status: 200 OK