Merged V1.4 to HEAD

svn merge svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@3987 svn://svn.alfresco.com:3691/alfresco/BRANCHES/V1.4@4133 .
   Removed LicenseComponent reference from projects\repository\source\java\org\alfresco\repo\descriptor\DescriptorServiceImpl.java


git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@4135 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Derek Hulley
2006-10-17 22:42:59 +00:00
parent 2f1bdec345
commit 12fd56b191
5 changed files with 142 additions and 30 deletions

View File

@@ -16,6 +16,8 @@
*/
package org.alfresco.repo.webdav;
import javax.servlet.http.HttpServletResponse;
import org.alfresco.service.cmr.model.FileInfo;
import org.alfresco.service.cmr.model.FileNotFoundException;
@@ -30,6 +32,7 @@ public class OptionsMethod extends WebDAVMethod
private static final String DAV_HEADER_CONTENT = "1,2";
private static final String ALLOW_HEADER = "Allow";
private static final String MS_HEADER = "MS-Author-Via";
private static final String CONTENT_LENGTH = "Content-Length";
private static final String FILE_METHODS = "OPTIONS, GET, HEAD, POST, DELETE, PROPFIND, COPY, MOVE, LOCK, UNLOCK";
private static final String COLLECTION_METHODS = FILE_METHODS + ", PUT";
@@ -77,15 +80,24 @@ public class OptionsMethod extends WebDAVMethod
catch (FileNotFoundException e)
{
// Do nothing; just default to a folder
isFolder = true;
}
// Add the header to advertise the level of support the server has
m_response.addHeader(DAV_HEADER, DAV_HEADER_CONTENT);
// Add the proprietary Microsoft header to make Microsoft clients behave
m_response.addHeader(MS_HEADER, DAV_HEADER);
// Add the header to show what methods are allowed
m_response.addHeader(ALLOW_HEADER, isFolder ? COLLECTION_METHODS : FILE_METHODS);
// Indicate no content
m_response.addHeader(CONTENT_LENGTH, "0");
}
}