tomcat-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Konstantin Kolinko <knst.koli...@gmail.com>
Subject Re: svn commit: r964780 - in /tomcat/trunk: java/org/apache/catalina/servlets/WebdavServlet.java webapps/docs/changelog.xml
Date Sun, 03 Oct 2010 19:29:16 GMT
2010/7/16  <markt@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

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@tomcat.apache.org
For additional commands, e-mail: dev-help@tomcat.apache.org


Mime
View raw message