Re: Status Line Syntax production/parsing

* Karl Dubost wrote:
>The syntax for the status-line of an HTTP response message is
>
>    status-line = HTTP-version SP status-code SP reason-phrase CRLF
>    — http://tools.ietf.org/html/draft-ietf-httpbis-p1-messaging-20#section-3.1.2

So there have to be two spaces, one before status-code and one after.

>     reason-phrase  = *( HTAB / SP / VCHAR / obs-text )

So a reason-phrase can be the empty string.

>I was wondering if there are any issues with status-line of the form:
>
>    status-line = HTTP-version SP status-code SP

It seems you are asking about, say,

  HTTP/1.1<sp>200<sp><crlf>

Which has the empty string as reason-phrase. That is fine.

>    status-line = HTTP-version SP status-code

If you are asking about something like

  HTTP/1.1<sp>200<crlf>

Without the <sp> after the status code, then no, that is not fine.
-- 
Björn Höhrmann · mailto:bjoern@hoehrmann.de · http://bjoern.hoehrmann.de
Am Badedeich 7 · Telefon: +49(0)160/4415681 · http://www.bjoernsworld.de
25899 Dagebüll · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/ 

Received on Tuesday, 28 August 2012 18:47:57 UTC