Subject: Does Reason-Phrase allow LWS?

From: Julian Reschke <[email-masked]>
Date: Fri, 23 Nov 2007 17:11:30 +0100

Hi.

Looking at...:

     TEXT           = <any OCTET except CTLs,
                      but including LWS>
     LWS            = [CRLF] 1*( SP | HT )
     CRLF           = CR LF

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

So was the real intent to say: any OCTET except CTLs?

BR, Julian

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Fri, 23 Nov 2007 17:20:06 +0100

>So was the real intent to say: any OCTET except CTLs?

That would disallow spaces. This is literally:

  OCTET - CTL + LWS - CR - LF

Which is the same as

  OCTET - CTL + SP + HT
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Julian Reschke <[email-masked]>
Date: Fri, 23 Nov 2007 17:23:25 +0100

> That would disallow spaces. This is literally:

No, it wouldn't. TEXT includes SP.

>   OCTET - CTL + LWS - CR - LF

If that's really the intet, we better say it explicitly.

So, is HT allowed in reason phrases?

BR, Julian

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Fri, 23 Nov 2007 17:30:24 +0100

>No, it wouldn't. TEXT includes SP.

But "any OCTET except CTLs" does not since CTL includes SP.

>So, is HT allowed in reason phrases?

According to RFC 2616 it is, because LWS includes it.
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Julian Reschke <[email-masked]>
Date: Fri, 23 Nov 2007 17:36:54 +0100

> But "any OCTET except CTLs" does not since CTL includes SP.

No, it doesn't:

     CTL            = <any US-ASCII control character
                      (octets 0 - 31) and DEL (127)>

> According to RFC 2616 it is, because LWS includes it.

OK, so I'd guess the best way to define it would be:

	Reason-Phrase = *( HT | %x20-7E | %x80-FF )

BR, Julian

---

From: Bjoern Hoehrmann <[email-masked]>
Date: Fri, 23 Nov 2007 17:58:37 +0100

>                      (octets 0 - 31) and DEL (127)>

No, what you don't realize is that I replace all tabs with spaces...

>	Reason-Phrase = *( HT | %x20-7E | %x80-FF )

Switching to ABNF this might be better written like

  Reason-Phrase = *( WSP / VCHAR / %x80-FF )

At least "HT" should eventually become "HTAB".
-- 
Björn Höhrmann · mailto:[email-masked] · http://bjoern.hoehrmann.de
Weinh. Str. 22 · Telefon: +49(0)621/4309674 · http://www.bjoernsworld.de
68309 Mannheim · PGP Pub. KeyID: 0xA4357E78 · http://www.websitedev.de/

---

From: Julian Reschke <[email-masked]>
Date: Fri, 23 Nov 2007 18:05:32 +0100

> No, what you don't realize is that I replace all tabs with spaces...

Not sure what you want to say here. Are you saying CTL contains SP? You 
confused me.

> At least "HT" should eventually become "HTAB".

Understood, but for now I'm just fixing what we have.

When we move to RFC4234bis syntax, then yes, we'll use the core rules.

BR, Julian

---

From: "Frank Ellermann" <[email-masked]>
Date: Mon, 26 Nov 2007 09:48:21 +0100

Bjoern Hoehrmann wrote:

> CTL includes SP.

Not in my 4234bis parallel universe:

|  CTL            =  %x00-1F / %x7F
|                               ; controls

I think what you're looking for is:

   Reason-Phrase  = *( VCHAR / WSP )

Frank

---

From: Mark Nottingham <[email-masked]>
Date: Tue, 27 Nov 2007 21:22:06 -0800

Now i94; <http://www.w3.org/Protocols/HTTP/1.1/rfc2616bis/issues/#i94>.

--
Mark Nottingham     http://www.mnot.net/