httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From William A Rowe Jr <wr...@rowe-clan.net>
Subject Re: svn commit: r1754548 - /httpd/httpd/trunk/server/protocol.c
Date Sun, 31 Jul 2016 16:18:23 GMT
On Jul 31, 2016 3:17 AM, "Yann Ylavic" <ylavic.dev@gmail.com> wrote:
>
> On Sun, Jul 31, 2016 at 12:56 AM, William A Rowe Jr <wrowe@rowe-clan.net>
wrote:
> > On Jul 30, 2016 4:36 PM, "Yann Ylavic" <ylavic.dev@gmail.com> wrote:
> >>
> >> On Sat, Jul 30, 2016 at 11:22 PM, Yann Ylavic <ylavic.dev@gmail.com>
> >> wrote:
> >> > On Fri, Jul 29, 2016 at 6:24 PM,  <wrowe@apache.org> 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 ]
>
>    obs-fold = CRLF 1*( SP / HTAB )
>
> So all the trailing SP/HTAB are part of obs-fold IMHO.
> Should we replace all of them (plus the CRLF) with a single SP or with
> as many SP?

Hmmm... Good point. Advancing over them in our HTTP_STRICT mode seems best,
if we have a consensus on this.

Mime
View raw message