[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
httpd response
- From: ari@xxxxxxxxxxxxxxxx (Akihiro Arisawa)
- Date: Fri, 23 Mar 2001 22:52:43 +0900
- X-ml-name: emacs-w3m
- X-mail-count: 00360
有沢です。
(w3m-w3m-get-header "http://server/")
=> "HTTP/1.0 200 Document follows
Date: Fri, 23 Mar 2001 08:58:50 GMT
Server: NCSA/1.4.2
Content-type: text/html
"
という Response を返すサーバが社内にあったのですが、
(w3m-w3m-attributes "http://server/")
=> nil
となってしまいます。
RFC 1945 によると、"HTTP/1.0 200 " 以降は任意みたいですので、
以下のようにしました。
2001-03-23 Akihiro Arisawa <ari@mbf.sphere.ne.jp>
* w3m.el (w3m-w3m-attributes): Don't check "OK" string in Status-Line.
--
有沢 明宏
6.1 Status-Line
The first line of a Full-Response message is the Status-Line,
consisting of the protocol version followed by a numeric status code
and its associated textual phrase, with each element separated by SP
characters. No CR or LF is allowed except in the final CRLF sequence.
Status-Line = HTTP-Version SP Status-Code SP Reason-Phrase CRLF
Since a status line always begins with the protocol version and
status code
"HTTP/" 1*DIGIT "." 1*DIGIT SP 3DIGIT SP
(e.g., "HTTP/1.0 200 "), the presence of that expression is
sufficient to differentiate a Full-Response from a Simple-Response.
Although the Simple-Response format may allow such an expression to
occur at the beginning of an entity body, and thus cause a
misinterpretation of the message if it was given in response to a
Full-Request, most HTTP/0.9 servers are limited to responses of type
"text/html" and therefore would never generate such a response.
6.1.1 Status Code and Reason Phrase
The Status-Code element is a 3-digit integer result code of the
attempt to understand and satisfy the request. The Reason-Phrase is
intended to give a short textual description of the Status-Code. The
Status-Code is intended for use by automata and the Reason-Phrase is
intended for the human user. The client is not required to examine or
display the Reason-Phrase.