DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT <http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27190>. ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND INSERTED IN THE BUG DATABASE.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=27190 Redirect problem with the COPY / MOVE request handling in the WebDAV servlet Summary: Redirect problem with the COPY / MOVE request handling in the WebDAV servlet Product: Tomcat 5 Version: 5.0.18 Platform: All OS/Version: All Status: NEW Severity: Normal Priority: Other Component: Servlets:WebDAV AssignedTo: [EMAIL PROTECTED] ReportedBy: [EMAIL PROTECTED] Hi, there is a redirect problem with the COPY / MOVE request handling in the WebDAV servlet of Tomcat. Environment: I created the webdav application with the following web.xml file in webapps/webdav/WEB-INF: <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd"> <web-app> <servlet> <servlet-name>webdav</servlet-name> <servlet-class>org.apache.catalina.servlets.WebdavServlet</servlet-class> <init-param> <param-name>debug</param-name> <param-value>10</param-value> </init-param> <init-param> <param-name>listings</param-name> <param-value>true</param-value> </init-param> <!-- Uncomment this to enable read and write access --> <init-param> <param-name>readonly</param-name> <param-value>false</param-value> </init-param> <!--load-on-startup>1</load-on-startup--> </servlet> <servlet-mapping> <servlet-name>webdav</servlet-name> <url-pattern>/</url-pattern> </servlet-mapping> </web-app> The directory webapps/webdav/ is writable by the Tomcat jvm. I created the collection col with cadaver (which worked fine). So this is our starting point: dav:/webdav/> ls Listing collection `/webdav/': succeeded. Coll: col 0 Jan 1 1970 If you try to move the collection col to col1 which results in the following request MOVE /webdav/col HTTP/1.1 User-Agent: neon/0.23.0 cadaver/0.20.5 Connection: TE TE: trailers Destination: http://127.0.0.1:8080/webdav/col1 Overwrite: T you get a 302 as response: HTTP/1.1 302 Moved Temporarily Location: http://127.0.0.1:8080/webdav/col/ Transfer-Encoding: chunked Date: Tue, 24 Feb 2004 13:37:41 GMT Server: Apache-Coyote/1.1 The reason for this behaviour is caused by the fact that MOVE /webdav/col is used instead of MOVE /webdav/col/. If you use MOVE /webdav/col/ everything works fine. This is the reason why there is the redirect-carefully special environment variable within Apache as this problem is known with many webdav clients (see also http://httpd.apache.org/docs-2.0/env.html#special). The actual redirect is created in the lines 753 - 767 of org/apache/tomcat/util/http/mapper/Mapper.java which creates this redirect long before the WebDAVServlet has a chance to handle this situation on its own. And now I am a little helpless how to fix this :-). Regards Rüdiger Plüm --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]