dCache/dcache — pull request #109 by gbehrmann (2013-06-24 20:34:32+00:00)
Title: webdav: Fix problems with root paths

Addresses several issues in the webdav door:

- HTTP PUT without redirect is broken in earlier versions of 2.6. This
regression was introduced in b460302934a6dab2cde1202a38883552d62ac65d.

The problem is that the the resource path after upload is produced by
concatenating the server's root path with a full dCache name space path,
thus the root path appear twice in the generated path.

- The URI name space depends on who authenticates, which means that the
same URI can have several meanings. This makes bookmarking and linking
difficult.

- The CSS refers to a non-existing background image.

The solution to these problems are related. The patch removes the
webdavChrootToUserRoot property. An authenticated users root directory
is now always enforced, but only by checking that the request is within
the users root path. If a user has a non-null root and accesses the
root of the webdav door, a redirect to the users home directory is
generated.

The above change resulted in repeated authentication requests in the
browser, because the browser would try to access a non-existing
background image and a non-existing favicon.ico file. Access to these
would be denied, as they are outside the users root directory, and
thus the browser would ask for another user name and password. To
solve this problem, the patch fixes the CSS and adds a favicon.ico file.

An earlier version of this patch was submitted as http://rb.dcache.org/r/5201/

Target: trunk
Request: 2.6
Require-book: yes
Require-notes: yes
Acked-by: Dmitry Litvintsev
Patch: http://rb.dcache.org/r/5672/
(cherry picked from commit e48a670d502815203704af59a2dedfa7307c13ba)

Conflicts:
modules/dcache-webdav/src/main/java/org/dcache/webdav/DcacheResourceFactory.java