Re: GETs with Entity-Body ??

Jeffrey Mogul <> writes:

>Robert Long wrote:
>> I am wondering whether GET requests are allowed to have an Entity-Body?
>This is probably a good time to remind people of the Robustness
>Principle, first stated (although not under that name) in RFC791,
>with respect to IP datagrams:

Jeff is right about the Robustness Principle, but in addition, HTTP 1.1
rev 6 explicitly states the requirement in section 4.3 "Message Body":

   "The presence of a message-body in a request is signaled by the
   inclusion of a Content-Length or Transfer-Encoding header field in
   the request's message-headers.  A message-body MUST NOT be included
   in a request if the specification of the request method (section
   5.1.1) does not allow sending an entity-body in requests.  A server
   SHOULD read and forward a message-body on any request;  if the
   request method does not include defined semantics for an entity-body,
   then the message-body SHOULD be ignored when handling the request."

Section 5.1.1 "Method" doesn't state an opinion on the validity of
entity-bodies for any methods, so they appear to always be allowed.
Section 9.3 "GET" doesn't define any semantics for entity-bodies, so
unconditionally-compliant proxy servers should always forward them and
unconditionally-compliant origin servers should always ignore them.
N.B. "Ignore" means read-and-discard if you want to keep a persistent
connection alive.

Ross Patterson
VM Software Division
Sterling Software, Inc.

Received on Thursday, 21 January 1999 13:06:00 UTC