DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=28073>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=28073

[PATCH]DirectoryIndexGenerator not encoding links correctly

           Summary: [PATCH]DirectoryIndexGenerator not encoding links
                    correctly
           Product: Slide
           Version: 2.0
          Platform: All
        OS/Version: Other
            Status: NEW
          Severity: Major
          Priority: Other
         Component: WebDAV Server
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


When the servlet init param "default-servlet" is set to "false" and the 
servlet mapping is set to say "/webdav", the servlet path should be used in 
the encoding of hrefs.  If you invoke http://localhost:8080/slide/webdav, the 
root index page will come up, but any subsequent folder links fail.  In 
DirectoryIndexGenerator I made the following changes:

1) Lines 150-152 can be removed:

        String contextPath = req.getContextPath();
        if (contextPath == null)
            contextPath = "";

2) Line 209 should be changed from:

            writer.print(WebdavUtils.encodeURL(contextPath, "UTF-8"));

to:

            writer.print(WebdavUtils.getAbsolutePath("", req, config));

3) Line 308 should be changed from:

            writer.print(WebdavUtils.encodeURL(contextPath + 
currentResource.substring(scope.length())));

to:

            writer.print(WebdavUtils.getAbsolutePath(currentResource, req, 
config));

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

Reply via email to