tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mark Thomas <>
Subject Re: WebDAV servlet returns 500 if files not readable
Date Tue, 01 Dec 2009 12:40:26 GMT
Martin Carpenter wrote:
> Hello,
> I have an issue with the standard WebDAV servlet bundled with Tomcat 5.5
> and 6.0 (tested 5.5.26 and 6.0.20) that is causing me some pain. If a
> directory contains a file that is not readable by the tomcat process (eg
> file permissions, dangling symlink) then TC throws a NullPointerException
> and returns a 500 Internal Server Error to the client. I think this
> is incorrect behavior and that it should at least list the files in a
> directory even if they are not all accessible to the user.
> I couldn't see this issue reported in the BugZilla or on this list.

Please create a new issue.

> This seems like a better solution but I worry about other dependencies on
> the existing behaviour. How is test coverage?

Tomcat unit tests are non-existent for this. I tend to use the litmus
test suite for WebDAV testing.

> Any other advice on how best to solve this appreciated!

I'm tempted to say any inaccessible file should just be ignored.
However, that could cause issues if a user tries to upload a file of
that name. Certainly, any such configuration isn't valid so returning an
error to the user and logging an error isn't too unreasonable. Maybe
better error reporting is the way to go with this one.


To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message