I checked with nginx, and via it's lua bindings it allows body for all
this methods. Also everybody knows that some of web-servers allows body
for GET even though this is not RFC conformant.
Refs: #408
event_warnx("%s: we got no content length, but the "
"server wants to keep the connection open: %s.",
__func__, connection);
- return (-1);
+ req->ntoread = 0;
} else if (content_length == NULL) {
req->ntoread = -1;
} else {
case EVHTTP_REQ_POST:
case EVHTTP_REQ_PUT:
case EVHTTP_REQ_PATCH:
- return 1;
- case EVHTTP_REQ_TRACE:
- return 0;
- /* XXX May any of the below methods have a body? */
+
case EVHTTP_REQ_GET:
- case EVHTTP_REQ_HEAD:
case EVHTTP_REQ_DELETE:
case EVHTTP_REQ_OPTIONS:
case EVHTTP_REQ_CONNECT:
- return 0;
+ return 1;
+
+ case EVHTTP_REQ_TRACE:
+ case EVHTTP_REQ_HEAD:
default:
return 0;
}