You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-user@jakarta.apache.org by Andrey Shulinsky <as...@arnoldworldwide.ca> on 2004/03/16 00:51:24 UTC

Copying files from Macs & WebdavUtils::getAbsolutePath issues

Hi, all!

I've encountered a couple of problems and will truly appreciate any comments
or suggestions about them.

1) The 
public static String getAbsolutePath (String uri, String contextPath,
                                          String servletPath,
                                          WebdavServletConfig config)
method of the WebdavUtils class throws IndexOutOfBoundsException when I
change the 'scope' parameter in the slide's web.xml like this:
        <init-param>
            <param-name>scope</param-name>
            <param-value>/files/Campaigns</param-value>
        </init-param>

This exception is originated in the following block of code

        if (scopeLength > 0){
            result = uri.substring(scopeLength);
        }

when it tries to get the absolute path of a resource that is located outside
of the exposed scope (like user or role in my case). So I've just changed
this block:

        if ((scopeLength > 0) &&
        	(uri.indexOf(config.getScope()) != -1)){
            result = uri.substring(scopeLength);
        }

I wonder if somebody else had the same problem and whether I've done the
correct thing... Maybe there's some "administrative" way to fix this without
changing the Slide code?

2) I am not able to copy files from Macs at all!
MacOS WebDAV client actually copies file (Netscape-MachO.dmg.gz) then says
"operation cannot be completed because file Netscape-MachO.dmg.gz is in
use". After I click the Stop button it lefts 0-sized Netscape-MachO.dmg.gz
file on the Slide storage. Here's the console output:
TP-Processor3, 15-Mar-2004 17:04:52, root, PROPFIND, 404 "Not Found", 16 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor3, 15-Mar-2004 17:04:53, root, PROPFIND, 404 "Not Found", 32 ms,
/TestCampaign1/Contents/PkgInfo
TP-Processor3, 15-Mar-2004 17:04:53, root, PROPFIND, 404 "Not Found", 16 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:53, root, PUT, 201 "Created", 609 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:53, root, PROPFIND, 207 "Multi-Status", 16
ms, /TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:53, root, GET, 200 "OK", 16 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:53, root, PROPFIND, 404 "Not Found", 16 ms,
/TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:53, root, PROPFIND, 404 "Not Found", 32 ms,
/TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor3, 15-Mar-2004 17:04:53, root, PUT, 201 "Created", 516 ms,
/TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor3, 15-Mar-2004 17:04:54, root, PROPFIND, 207 "Multi-Status", 16
ms, /TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor3, 15-Mar-2004 17:04:54, root, LOCK, 200 "OK", 141 ms,
/TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor3, 15-Mar-2004 17:04:54, root, GET, 200 "OK", 15 ms,
/TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:54, root, PUT, 423 "Locked", 63 ms,
/TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:54, root, PROPFIND, 404 "Not Found", 16 ms,
/TestCampaign1/.DS_Store
TP-Processor3, 15-Mar-2004 17:04:55, root, PUT, 423 "Locked", 46 ms,
/TestCampaign1/._Netscape-MachO.dmg.gz
TP-Processor3, 15-Mar-2004 17:04:55, root, LOCK, 200 "OK", 109 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:04:58, root, PUT, 423 "Locked", 47 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:05:02, root, DELETE, 423 "Locked", 15 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:05:02, root, DELETE, 423 "Locked", 0 ms,
/TestCampaign1/Netscape-MachO.dmg.gz
TP-Processor2, 15-Mar-2004 17:05:02, root, PROPFIND, 207 "Multi-Status", 32
ms, /TestCampaign1

Looks like MacOS WebDAV client tries adds extra files (should be some
MacOS-specific stuff) and server can't handle all requests properly...

Thanks in advance.

Yours sincerely,
Andrey.


---------------------------------------------------------------------
To unsubscribe, e-mail: slide-user-unsubscribe@jakarta.apache.org
For additional commands, e-mail: slide-user-help@jakarta.apache.org