You are viewing a plain text version of this content. The canonical link for it is here.
Posted to slide-dev@jakarta.apache.org by di...@the-ecorp.com on 2001/02/21 09:40:50 UTC

Problem with proppatch in command-line tool (patch included)

When testing the command line client, I found this small bug in
client\src\org\apache\webdav\cmd\Main.java
When executing proppatch, the name and value also get an url prefix and this
gives an error on the server when parsing
the xml.

The problem is with checkUri in the method "private void processCommands(
final WebdavClient client )", the "if( todo.equalsIgnoreCase("proppatch") )"
part.

Unified patch in attachment.

 <<patch>> 
Greetings,
Dirk


----- Server Error
org.xml.sax.SAXParseException: Expected "</D:prop>" to terminate element
starting on line 2.
        at com.sun.xml.parser.Parser.fatal(Parser.java:2817)
        at com.sun.xml.parser.Parser.fatal(Parser.java:2811)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1406)
        at com.sun.xml.parser.Parser.content(Parser.java:1499)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
        at com.sun.xml.parser.Parser.content(Parser.java:1499)
        at com.sun.xml.parser.Parser.maybeElement(Parser.java:1400)
        at com.sun.xml.parser.Parser.parseInternal(Parser.java:492)
        at com.sun.xml.parser.Parser.parse(Parser.java:284)
        at
com.sun.xml.parser.DocumentBuilderImpl.parse(DocumentBuilderImpl.java:95)
        at
org.apache.slide.webdav.method.PropPatchMethod.parseRequest(PropPatchMethod.
java:167)
        at
org.apache.slide.webdav.method.WebdavMethod.run(WebdavMethod.java:318)
        at
org.apache.slide.webdav.WebdavServlet.service(WebdavServlet.java:278)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
        at
org.apache.tomcat.core.ServletWrapper.doService(ServletWrapper.java:404)

------- Client
[Slide /slide/files ]$ proppatch test a 1
param: test 
param: a 
param: 1 
Reopen connection : Host:127.0.0.1 Port:8080 Request: PROPPATCH
/slide/files/test HTTP/1.1 <?xml version="1.0" encoding="utf-8" ?>
<D:propertyupdate
xmlns:D="DAV:"><D:set><D:prop></slide/files/a>/slide/files/1<//slide/files/a
>
</D:prop>
</D:set>
</D:propertyupdate>
 Response: HTTP/1.0 400 Bad Request Closing connection Status: 400