[PATCH] Allow PUT requests with empty bodies

Michael Schurter michael.schurter at urbanairship.com
Tue Dec 28 03:44:39 MSK 2010

As of 0.8.54 nginx returns a 411 Length Required response upon
receiving a PUT with no Content-Length header. There is nothing in the
HTTP 1.1 RFC that disallows empty PUTs. "Content-Length: n" or
"Transfer-Encoding: chunked" are only required if there is a body.
Therefore I saw no reason for this check to exist and removed it to
permit our RESTful HTTP API to function as currently designed.

PUTs with no body or Content-Length header seem to work as expected as
do PUTs with a Content-Length and body message.

Any chance of getting this patch accepted into nginx 0.8?

Michael Schurter
(schmichael in IRC)
-------------- next part --------------
A non-text attachment was scrubbed...
Name: remove-empty-put-check.patch
Type: text/x-patch
Size: 807 bytes
Desc: not available
URL: <http://nginx.org/pipermail/nginx-devel/attachments/20101227/94dc6851/attachment.bin>

More information about the nginx-devel mailing list