In summary there were two issues with COPY method. (a) If Destination directory doesn't exist but it is still inside the DAV directory, apache returned 500. In this fix if destination directory doesn't exist, we return 409 Conflict. (b) If Destination directory doesn't fall under a DAV provider, apache crashes. In this fix if Destination directory doesn't exist then 403 forbidden is returned. Here are response code suggested by rfc 2518 : http://asg.web.cmu.edu/rfc/rfc2518.html#sec-8.8 Here is how I did the testing : my httpd.conf has following configuration : Options Indexes FollowSymLinks AllowOverride None order allow,deny allow from all AuthName "SMA Development server" AuthType Basic DAV On Options Indexes FollowSymLinks AllowOverride None order allow,deny allow from all AuthName "SMA Development server" AuthType Basic DAV On --------------------------------------- Test 1 : Destination is outside DAV collection. COPY /DAVtest/litmus/copysrc HTTP/1.1 Host: localhost:4004 User-Agent: litmus/0.11 neon/0.25.5 Connection: TE TE: trailers Depth: 0 Destination: http://localhost:4004/DAVtest1/litmus/nonesuch/foo Overwrite: F X-Litmus: copymove: 5 (copy_nodestcoll) Response : Date: Wed, 07 Mar 2007 00:32:52 GMT Server: Apache/2.2.5-dev (Unix) mod_ssl/2.2.5-dev OpenSSL/0.9.8a DAV/2 SVN/1.4.3 mod_perl/2.0.4-dev Perl/v5.8.8 Content-Length: 178 Content-Type: text/html 403 Forbidden

Forbidden

Destination URI had an error.

--------------------------------------- Test 2 : Destination is inside DAV collection but it doesn't exists. COPY /DAVtest/litmus/copysrc HTTP/1.1 Host: localhost:4004 User-Agent: litmus/0.11 neon/0.25.5 Connection: TE TE: trailers Depth: 0 Destination: http://localhost:4004/DAVtest/litmus/nonesuch/foo Overwrite: F X-Litmus: copymove: 5 (copy_nodestcoll) Date: Wed, 07 Mar 2007 00:33:02 GMT Server: Apache/2.2.5-dev (Unix) mod_ssl/2.2.5-dev OpenSSL/0.9.8a DAV/2 SVN/1.4.3 mod_perl/2.0.4-dev Perl/v5.8.8 Content-Length: 509 Content-Type: text/html; charset=iso-8859-1 409 Conflict

Conflict

The server encountered an internal error or misconfiguration and was unable to complete your request.

Please contact the server administrator, you@example.com and inform them of the time the error occurred, and anything you might have done that may have caused the error.

More information about this error may be available in the server error log.

--------------------------------------- Test 3 : Destination is in other DAV collection COPY /DAVtest/litmus/copysrc HTTP/1.1 Host: localhost:4004 User-Agent: litmus/0.11 neon/0.25.5 Connection: TE TE: trailers Depth: 0 Destination: http://localhost:4004/DAVOtherTest/foo Overwrite: F X-Litmus: copymove: 5 (copy_nodestcoll) Date: Wed, 07 Mar 2007 00:40:18 GMT Server: Apache/2.2.5-dev (Unix) mod_ssl/2.2.5-dev OpenSSL/0.9.8a DAV/2 SVN/1.4.3 mod_perl/2.0.4-dev Perl/v5.8.8 Location: http://localhost:4004/DAVOtherTest/foo Content-Length: 192 Content-Type: text/html 201 Created

Created

Destination /DAVOtherTest/foo has been created.

---------------------------------------