mirror of
https://github.com/Alfresco/alfresco-community-repo.git
synced 2025-08-14 17:58:59 +00:00
Merged BRANCHES/DEV/THOR1_SPRINTS to HEAD:
36060: THOR-1373: Proxied WebDAV must generate correct URLs when URL-rewriting is used. git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@39078 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
@@ -347,8 +347,12 @@ public class WebDAVServlet extends HttpServlet
|
||||
m_davMethods.put(WebDAV.METHOD_PUT, PutMethod.class);
|
||||
m_davMethods.put(WebDAV.METHOD_UNLOCK, UnlockMethod.class);
|
||||
}
|
||||
|
||||
protected WebDAVHelper getDAVHelper()
|
||||
{
|
||||
return m_davHelper;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* @param storeValue
|
||||
* @param rootPath
|
||||
@@ -437,6 +441,8 @@ public class WebDAVServlet extends HttpServlet
|
||||
private boolean enabled = false;
|
||||
private String storeName;
|
||||
private String rootPath;
|
||||
private String urlPathPrefix;
|
||||
|
||||
public boolean getEnabled()
|
||||
{
|
||||
return enabled;
|
||||
@@ -477,5 +483,39 @@ public class WebDAVServlet extends HttpServlet
|
||||
{
|
||||
this.rootPath = rootPath;
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the path prefix that generated URLs should exhibit, e.g.
|
||||
* <pre>
|
||||
* http://server.name<prefix>/path/to/file.txt
|
||||
* </pre>
|
||||
* In the default set up this would be of the form /context-path/servlet-name e.g. /alfresco/webdav:
|
||||
* <pre>
|
||||
* http://server.name/alfresco/webdav/path/to/file.txt
|
||||
* </pre>
|
||||
* however if using URL rewriting rules or a reverse proxy in front of the webdav server
|
||||
* you may choose to use, for example / for shorter URLs.
|
||||
* <pre>
|
||||
* http://server.name/path/to/file.txt
|
||||
* </pre>
|
||||
* <p>
|
||||
* Leaving this property blank will cause the prefix used to be /context-path/servlet-name
|
||||
*
|
||||
* @return the urlPathPrefix
|
||||
*/
|
||||
public String getUrlPathPrefix()
|
||||
{
|
||||
return urlPathPrefix;
|
||||
}
|
||||
|
||||
/**
|
||||
* See {@link #getUrlPathPrefix()}
|
||||
*
|
||||
* @param urlPathPrefix
|
||||
*/
|
||||
public void setUrlPathPrefix(String urlPathPrefix)
|
||||
{
|
||||
this.urlPathPrefix = urlPathPrefix;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user