| From | Sent On | Attachments |
|---|---|---|
| mar...@apache.org | Jul 16, 2010 4:59 am | |
| Konstantin Kolinko | Oct 3, 2010 12:28 pm |
| Subject: | Re: svn commit: r964780 - in /tomcat/trunk: java/org/apache/catalina/servlets/WebdavServlet.java webapps/docs/changelog.xml | |
|---|---|---|
| From: | Konstantin Kolinko (knst...@gmail.com) | |
| Date: | Oct 3, 2010 12:28:53 pm | |
| List: | org.apache.tomcat.dev | |
2010/7/16 <mar...@apache.org>:
Author: markt Date: Fri Jul 16 11:59:57 2010 New Revision: 964780
URL: http://svn.apache.org/viewvc?rev=964780&view=rev
Log:
Fix https://issues.apache.org/bugzilla/show_bug.cgi?id=49428
Add a work-around for the known namespace issues for some Microsoft WebDAV
clients. Patch provided by Panagiotis Astithas.
Modified: tomcat/trunk/java/org/apache/catalina/servlets/WebdavServlet.java tomcat/trunk/webapps/docs/changelog.xml
1) Looking at lines 1159-1166 of WebdavServlet of TC7 @1004014:
generatedXML.writeElement (null, "D:multistatus" + generateNamespaceDeclarations(), XMLWriter.OPENING);
while (lockPathsList.hasMoreElements()) { generatedXML.writeElement(null, "response", XMLWriter.OPENING); generatedXML.writeElement(null, "href", XMLWriter.OPENING);
Those "response", "href" have no D: prefix
2) Looking at o.a.catalina.util.XMLWriter.writeElement() methods there is public void writeElement(String namespace, String namespaceInfo, String name, int type) which takes care both of the namespace prefix and of namespace URL. I think that method must be used, instead of using '+ generateNamespaceDeclarations()' which is a trick.
Thus I expect the above fragment to be
generatedXML.writeElement ("D", DEFAULT_NAMESPACE, "multistatus", XMLWriter.OPENING);
while (lockPathsList.hasMoreElements()) { generatedXML.writeElement("D", null, "response", XMLWriter.OPENING); generatedXML.writeElement("D", null, "href", XMLWriter.OPENING);
and so on.
Best regards, Konstantin Kolinko





