Re: Distinguishing 0-byte request body in HTTP/2

Hi Roy,

On Thu, Sep 15, 2016 at 01:13:01PM -0700, Roy T. Fielding wrote:
> > I'd be tempted to simplify this as "if you're sending a body even an empty
> > one, announce its size in content-length". Methods like POST and PUT expect
> > a message body so that should always be done.
> No.  It is never a good idea to send extra information just in case you
> might encounter a broken server.  It is better to send less information and
> let people fix their own broken code.  Otherwise, the Internet becomes a
> cesspool of poorly imagined cases that are far less likely to exist than
> the keel-over-waiting-for-the-extra-TCP-packets cases that always exist.

But if c-l:0 is supposed to be exactly equivalent to no c-l, then what's
the purpose of status code 411 ? My understanding no c-l means there is
no body while c-l: 0 means the body is empty, both of which are totally
equivalent from a framing perspective, but not necessarily from a
semantics perspective.


Received on Thursday, 15 September 2016 22:07:08 UTC