Hi All,
        I was trying to mount Slide as a drive on Windows XP, using the
command "net use * http://mymachine/slide";. I always get an "invalid
directory name" error.
        Since I can use the same "net use" command against IIS/WebDAV and
Apache/mod_dav, I did some reverse engineering and figured out where the
problem is. The redirector (mrxdav.sys, invoked through davclnt.dll when
using "net use"), parses the XML response in its own way. It does not like
the white space, carriage return, etc. that is returned by Slide. 
        The fix is to use a different JDOM Format (CompactFormat instead of
PrettyFormat) in PropFind output. Changing these lines (starting from line
284 of PropFindMethod.java)

// Create multistatus object
Element multistatusElement = new Element(E_MULTISTATUS, DNSP);
org.jdom.output.Format format = org.jdom.output.Format.getPrettyFormat();
format.setIndent(XML_RESPONSE_INDENT);
XMLOutputter xmlOutputter = new XMLOutputter(format); 

To

// Create multistatus object
Element multistatusElement = new Element(E_MULTISTATUS, DNSP);
org.jdom.output.Format format = org.jdom.output.Format.getPrettyFormat();
format.setIndent(XML_RESPONSE_INDENT);
//======== Begin Change ==============
// Microsoft Windows XP WebDAV redirector (MRXDAV.SYS) does not like pretty
format
String  userAgent = req.getHeader("User-Agent");
if (userAgent != null &&
    userAgent.toLowerCase().indexOf("microsoft-webdav-miniredir") != -1)
    format = org.jdom.output.Format.getCompactFormat();
//======== End Change ================
XMLOutputter xmlOutputter = new XMLOutputter(format); 

Will solve the problem.
        The Microsoft WebFolder (MSDAIPP.DLL) does not have this problem. It
can open current Slide successfully.
        Can any committer further investigate this and decide whether the
change should be included in the next release?

Best Regards,
Jie Ren


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to