W3C home > Mailing lists > Public > ietf-http-wg@w3.org > April to June 2013

Re: WGLC p1: MUST fix Content-Length?

From: Willy Tarreau <w@1wt.eu>
Date: Wed, 1 May 2013 09:43:41 +0200
To: Alex Rousskov <rousskov@measurement-factory.com>
Cc: IETF HTTP WG <ietf-http-wg@w3.org>
Message-ID: <20130501074341.GM27137@1wt.eu>
On Wed, May 01, 2013 at 01:37:29AM -0600, Alex Rousskov wrote:
> On 05/01/2013 01:22 AM, Willy Tarreau wrote:
> > On Tue, Apr 30, 2013 at 11:53:28PM -0600, Alex Rousskov wrote:
> >> Hello,
> >>
> >>     When talking about a Content-Length header field with multiple
> >> identical values, Part 1 Section 3.3.2 of HTTPbis says:
> >>
> >>> the recipient MUST either reject the message as invalid or
> >>> replace the duplicated field-values with a single valid
> >>> Content-Length field containing that decimal value prior to
> >>> determining the message body length.
> >>
> >> It is not clear whether "recipient MUST replace" (a requirement on the
> >> recipient) also implies that "a sender MUST replace [...] when
> >> forwarding the message" (a requirement on the sender). This issue has
> >> been raised on 2011/11/28, but the discussion diverged, and I could not
> >> tell whether there was a consensus on what the correct interpretation is.
> >>
> >> Please decide whether a proxy MUST "fix" such Content-Length headers
> >> when forwarding the message and adjust the above text to clarify one way
> >> or another.
> > 
> > That's what the discussion converged to. I even modified haproxy in order
> > to do so. The idea is simple : if you receive a message with multiple
> > content lengths, either you can't deal with them and must reject the
> > message, or you can deal with them and then you know how to fix the
> > message before interpreting it or forwarding it, so you must do so.
> > 
> > Do you think the text needs to be adjusted ?
> 
> Yes, of course. The current text is not clear IMO, as I tried to explain
> in the beginning of this message.

Then what about :

   recipient MUST either reject the message as invalid or replace the
   duplicated field-values with a single valid Content-Length field
   containing that decimal value prior to determining the message body
-  length.
+  length or forwarding it.

Willy
Received on Wednesday, 1 May 2013 07:44:10 UTC

This archive was generated by hypermail 2.3.1 : Tuesday, 1 March 2016 11:11:12 UTC