meteozond/djangodav — pull request #21 by chrisv2 (2014-05-22 10:33:58+00:00)
Title: fix some quirks with GVFS

This patch addresses some issues I've seen with GVFS (gnome dav:// location), and other clients:

- if DAV resource is called without trailing slash, `path` will be `None` in `dispatch()`. This must be handled explicitely so `self.path` and `self.base_url` still have the correct values

- returning `None` on root confuses GVFS. Better not send any display name at all, if it is undefined (that's what SabreDAV does, for example).

- (broken) clients sometimes send `ContentLength:` header (with empty string). Though this is probably not RFC-conformant, it is not necessary to respond with Error 500 (caused by calling `int('')`).