411 Length Required error

Evert Pot evertpot at gmail.com
Thu Aug 20 19:17:57 MSD 2009

On 20-Aug-09, at 10:11 AM, Maxim Dounin wrote:

>> Finder will do a PUT request in some cases, without a Content-Length
>> header. It does send the data 'Chunked'.
> [..snip..]
> This doesn't mean that there is no plan to support it (at least
> some java clients known to use it too), but it's not really high
> priority task.

It's good news this is on your radar. For now Finder + Nginx for  
WebDAV is simply not compatible.
Do you guys have a project management tool where this stuff is  
tracked? I'd like to keep tabs if there's updates in the future.

I've also sent a bug report to Apple.

>> There was another issue (less important), but I wanted to throw it  
>> out
>> there. When a request (such as MOVE) generates an empty response- 
>> body,
>> and there is no Content-Length, nginx will effectively hang until the
>> HTTP keepalive timeout is reached. This was easily fixed by adding
>> Content-Length: 0, but I wanted to mention it because Apache adds  
>> this
>> automatically, so it might help for better compatibility. Note that
>> this is all PHP.
> If there is no Content-Length in response nginx will use
> Transfer-Encoding: chunked in the reply (or connection close for
> HTTP/1.0 requests), and this shouldn't break anything.
> Could you please provide some more details on the problem you see?
> For now it looks like client issue instead.

This is the exact email from the mailing list. If needed I can request  
more information:

I have a large delay after MOVE requests when using Mac OSX. It was
exactly the same time as my keepalive timeout, so I tested using an
alternative client (cadaver) and the same thing - MOVE request would
occur immediately, the HTTP response would be sent, again immediately,
but the client would hang until the server timed out the connection
(in my case 75 seconds). Both Finder and Cadaver showed the same
When I disabled keep alive on nginx, the MOVE request was picked up

What's wrong here? Do I have to disable keep alive?

I also noticed that the spec says to return a Location header, which
isn't there. That doesn't appear to be an issue though. If you want to
put it in it's in the httpMove function after the sendStatus line.

$this->httpResponse->setHeader('Location', $this->httpRequest-


Here's the request and response ...
x.y.z.a.56253-x.y.z.b.00080: MOVE /dav/test/sub2 HTTP/1.1
Host: dav.example.com
User-Agent: cadaver/0.23.2 neon/0.28.4
Connection: TE
TE: trailers
Destination: http://dav.example.com/dav/test/sub
Overwrite: T
Authorization: Basic YiulnLlkjlkz

x.y.z.a.00080-x.y.z.b.56253: HTTP/1.1 201 Created
Server: nginx/0.7.61
Date: Wed, 19 Aug 2009 00:26:08 GMT
Content-Type: text/html
Connection: keep-alive
Keep-Alive: timeout=20
X-Powered-By: PHP/5.2.10-pl0-gentoo

[client hangs here for 75 seconds, then suceeds]

>> The last one, but this might have been fixed. I tested Nginx a while
>> back, and it didn't seem to have support for the Expect: 100-continue
>> header. I'm just curious if this has been fixed since then. I've
>> noticed certain .NET HTTP clients use this header.
> Support for "Expect: 100-continue" appeared in nginx 0.7.4.

Thanks very much for your quick responses! Good to hear this one was  


More information about the nginx mailing list