Re: svn commit: r1710723 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_util.h

2015-10-28 Thread William A Rowe Jr
On Tue, Oct 27, 2015 at 1:17 PM, Roy T. Fielding  wrote:

> > On Oct 26, 2015, at 11:45 PM, jaillet...@apache.org wrote:
> >
> > Author: jailletc36
> > Date: Tue Oct 27 06:45:03 2015
> > New Revision: 1710723
> >
> > URL: http://svn.apache.org/viewvc?rev=1710723=rev
> > Log:
> > RFC2616 defines #rules as:
> >   #rule
> >  A construct "#" is defined, similar to "*", for defining lists of
> >  elements. The full form is "#element" indicating at least
> >   and at most  elements, each separated by one or more commas
> >  (",") and OPTIONAL linear white space (LWS). This makes the usual
> >  form of lists very easy; a rule such as
> > ( *LWS element *( *LWS "," *LWS element ))
> >  can be shown as
> > 1#element
> >
> > It also defines Linear White Space (LWS) as:
> >   LWS= [CRLF] 1*( SP | HT )
> >
> >
> > The actual implementation only accepts SP (Space) and not HT (Horizontal
> Tab) when parsing cache related header fields (i.e. "Vary", "Cache-Control"
> and "Pragma")
>
> Well, to be more accurate: RFC7230 defines these (2616 no longer applies)
> and
> the original algorithm did handle HT.  My bet is that someone screwed up an
> automated TAB -> two space conversion and the code change got lost in the
> noise.
>

Interestingly it was only introduced in a recent commit (2 yrs ago) with
the defect,
one might guess that the vi/emacs template did the damage when the text was
pasted in.

See also server.c/protocol.c@920 on trunk, which has the correct HT
handling,
explicitly.


Re: svn commit: r1710723 - in /httpd/httpd/trunk: CHANGES modules/cache/cache_util.h

2015-10-27 Thread Roy T. Fielding
> On Oct 26, 2015, at 11:45 PM, jaillet...@apache.org wrote:
> 
> Author: jailletc36
> Date: Tue Oct 27 06:45:03 2015
> New Revision: 1710723
> 
> URL: http://svn.apache.org/viewvc?rev=1710723=rev
> Log:
> RFC2616 defines #rules as:
>   #rule
>  A construct "#" is defined, similar to "*", for defining lists of
>  elements. The full form is "#element" indicating at least
>   and at most  elements, each separated by one or more commas
>  (",") and OPTIONAL linear white space (LWS). This makes the usual
>  form of lists very easy; a rule such as
> ( *LWS element *( *LWS "," *LWS element ))
>  can be shown as
> 1#element
> 
> It also defines Linear White Space (LWS) as:
>   LWS= [CRLF] 1*( SP | HT )
> 
> 
> The actual implementation only accepts SP (Space) and not HT (Horizontal Tab) 
> when parsing cache related header fields (i.e. "Vary", "Cache-Control" and 
> "Pragma")

Well, to be more accurate: RFC7230 defines these (2616 no longer applies) and
the original algorithm did handle HT.  My bet is that someone screwed up an
automated TAB -> two space conversion and the code change got lost in the noise.

Your fix looks right, though.

Roy