Resolve WebDAV merge weirdness

- resynced with V3.4.1

git-svn-id: https://svn.alfresco.com/repos/alfresco-enterprise/alfresco/HEAD/root@26819 c4b6b30b-aa2e-2d43-bbcb-ca4b014f7261
This commit is contained in:
Dave Ward
2011-04-12 15:13:51 +00:00
parent 8739e205cb
commit 3312297afc
2 changed files with 10 additions and 33 deletions

View File

@@ -390,12 +390,7 @@ public class LockMethod extends WebDAVMethod
xml.startDocument(); xml.startDocument();
// Output the lock details String nsdec = generateNamespaceDeclarations(null);
String nsdec = "";
if (WebDAV.AGENT_MS_6_1_7600.equals(m_userAgent))
{
nsdec = generateNamespaceDeclarations(null, true);
xml.startElement(WebDAV.DAV_NS, WebDAV.XML_PROP + nsdec, WebDAV.XML_NS_PROP + nsdec, getDAVHelper().getNullAttributes()); xml.startElement(WebDAV.DAV_NS, WebDAV.XML_PROP + nsdec, WebDAV.XML_NS_PROP + nsdec, getDAVHelper().getNullAttributes());
// Output the lock details // Output the lock details
@@ -404,34 +399,20 @@ public class LockMethod extends WebDAVMethod
// Close off the XML // Close off the XML
xml.endElement(WebDAV.DAV_NS, WebDAV.XML_PROP, WebDAV.XML_NS_PROP); xml.endElement(WebDAV.DAV_NS, WebDAV.XML_PROP, WebDAV.XML_NS_PROP);
}
else
{
nsdec = generateNamespaceDeclarations(null, false);
xml.startElement(EMPTY_NS, WebDAV.XML_PROP, WebDAV.XML_PROP + nsdec, getDAVHelper().getNullAttributes());
// Output the lock details
generateLockDiscoveryXML(xml, lockNode, true, scope, WebDAV.getDepthName(m_depth), lt, owner);
// Close off the XML
xml.endElement(EMPTY_NS, WebDAV.XML_PROP, WebDAV.XML_PROP);
}
} }
/** /**
* Generates a list of namespace declarations for the response * Generates a list of namespace declarations for the response
*/ */
protected String generateNamespaceDeclarations(HashMap<String,String> nameSpaces, boolean withPrefix) protected String generateNamespaceDeclarations(HashMap<String,String> nameSpaces)
{ {
StringBuilder ns = new StringBuilder(); StringBuilder ns = new StringBuilder();
ns.append(" "); ns.append(" ");
ns.append(WebDAV.XML_NS); ns.append(WebDAV.XML_NS);
if (withPrefix)
{
ns.append(":"); ns.append(":");
ns.append(WebDAV.DAV_NS); ns.append(WebDAV.DAV_NS);
}
ns.append("=\""); ns.append("=\"");
ns.append(WebDAV.DEFAULT_NAMESPACE_URI); ns.append(WebDAV.DEFAULT_NAMESPACE_URI);
ns.append("\""); ns.append("\"");

View File

@@ -127,10 +127,6 @@ public class WebDAV
public static final String AGENT_MICROSOFT_DATA_ACCESS_INTERNET_PUBLISHING_PROVIDER_DAV = "Microsoft Data Access Internet Publishing Provider DAV"; public static final String AGENT_MICROSOFT_DATA_ACCESS_INTERNET_PUBLISHING_PROVIDER_DAV = "Microsoft Data Access Internet Publishing Provider DAV";
public static final String AGENT_INTERNET_EXPLORER = "MSIE"; public static final String AGENT_INTERNET_EXPLORER = "MSIE";
// User agents
public static final String AGENT_MS_6_1_7600 = "Microsoft-WebDAV-MiniRedir/6.1.7600";
// General string constants // General string constants
public static final String ASTERISK = "*"; public static final String ASTERISK = "*";