[XMLHttpRequest-tests] Following RFC2616, assert that there is no message-body, rather than no entity header (#981)

>From http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html:

> For response messages, whether or not a message-body is included with a
message is dependent on both
> the request method and the response status code (section 6.1.1). All
responses to the HEAD request
> method MUST NOT include a message-body, even though the presence of entity-
header fields might lead
> one to believe they do.

This means that a server may believe there is a message-body, due to the
presence of Content-Length or Transfer-Encoding, but this does not mean that a
message-body was actually transmitted.

In particular, if Content-Length is 0, then the message-body has both an
entity length and transfer length of 0, which one should take to mean that no
request body was actually included in the request.

Closes #980

View on GitHub: https://github.com/w3c/web-platform-tests/pull/981

Received on Saturday, 10 May 2014 02:00:38 UTC