On Jul 30, 2016 4:36 PM, "Yann Ylavic" <[email protected]> wrote:
>
> On Sat, Jul 30, 2016 at 11:22 PM, Yann Ylavic <[email protected]>
wrote:
> > On Fri, Jul 29, 2016 at 6:24 PM,  <[email protected]> wrote:
> >> Author: wrowe
> >> Date: Fri Jul 29 16:24:14 2016
> >> New Revision: 1754548
> >>
> >> URL: http://svn.apache.org/viewvc?rev=1754548&view=rev
> >> Log:
> >> Strictly observe spec on obs-fold
> >>
> >> Modified:
> >>     httpd/httpd/trunk/server/protocol.c
> > []
> >>
> >>                  memcpy(last_field + last_len, field, len +1); /* +1
for nul */
> >> +                /* Replace obs-fold w/ SP per RFC 7230 3.2.4 */
> >> +                if (conf->http_conformance &
AP_HTTP_CONFORMANCE_STRICT) {
> >> +                    last_field[last_len] = ' ';
> >> +                }
> >
> > The wording is:
> >    A user agent that receives an obs-fold in a response message that is
> >    not within a message/http container MUST replace each received
> >    obs-fold with one or more SP octets prior to interpreting the field
> >    value.
>
> Please forget the "user agent" part, the wording for
> server/proxy/gateway is the same though, from "MUST replace each
> received..."
>
> >
> > Not sure if it means that one HTAB or more than one SP/HTAB of each
> > obs-fold should be replaced by a single SP (that's what I think), or
> > if it's that all HTAB should be replaced by a SP (keeping as many
> > "spaces").
> >
> > In any case the above code will replace one HTAB only, we probably
> > need a loop here.
> >
> >>                  last_len += len;
> >>                  folded = 1;
> >>              }
> >
> > Regards,
> > Yann.

So the obs-fold itself consists of CR LF [ SP | TAB ]

Any whitespace following the single sp/tab is field whitespace. I
considered and determined we do not further collapse whitespace, as these
may be in quoted field contents.

But the CR LF TAB becomes SP per spec.

Reply via email to