Hi,
RFC 2616, section 4.3:
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 9.7 does not forbid a message-body for the DELETE method.
We have a customer who needs this for his REST api and apache's
mod_proxy (2.2.16, debian squeeze) and GlassFish
( http://glassfish.java.net ) can handle this.
Comments, oks?
Thanks,
Florian
Index: relay.c
===================================================================
RCS file: /opt/OpenBSD-CVS/src/usr.sbin/relayd/relay.c,v
retrieving revision 1.146
diff -u -r1.146 relay.c
--- relay.c 11 Apr 2012 08:25:26 -0000 1.146
+++ relay.c 26 Apr 2012 16:13:16 -0000
@@ -1372,7 +1372,8 @@
if (ret == PN_FAIL)
goto abort;
}
- } else if ((cre->method == HTTP_METHOD_POST ||
+ } else if ((cre->method == HTTP_METHOD_DELETE ||
+ cre->method == HTTP_METHOD_POST ||
cre->method == HTTP_METHOD_PUT ||
cre->method == HTTP_METHOD_RESPONSE) &&
strcasecmp("Content-Length", pk.key) == 0) {
@@ -1466,6 +1467,7 @@
/* Data stream */
bev->readcb = relay_read;
break;
+ case HTTP_METHOD_DELETE:
case HTTP_METHOD_POST:
case HTTP_METHOD_PUT:
case HTTP_METHOD_RESPONSE: