[prev in list] [next in list] [prev in thread] [next in thread] 

List:       slide-dev
Subject:    Re: PropFindMethod in WebDAV Client
From:       "Remy Maucherat" <remm () apache ! org>
Date:       2000-11-30 19:45:16
[Download RAW message or body]

> FIXED CODE 1)
> in the PropFindMethod.java, like this,
>
>         case BY_NAME:
>             printer.writeElement("D", "prop", WebdavXMLPrinter.OPENING);
>             while (propertyNames.hasMoreElements()) {
>                 String propertyName = (String)
propertyNames.nextElement();
>                 printer.writeElement(null, propertyName,
>                 //printer.writeElement("D", propertyName,
>                                      WebdavXMLPrinter.NO_CONTENT);

Actually, the functionality to let the client specify the namespace to which
the property belongs is missing. Assigning it to the default DAV: namespace
is a quick fix which will break in a lot of cases.
BTW, although the header says I'm the author of this, actually I'm not. B.C.
just forgot to add his name.

> FIXED CODE 2)
> Remy, still it doesn't work only wit builder.parse().  :-(
> parseReponse() in the XMLResponseMethodBase.java
>
>                 StringBuffer sb = new StringBuffer();
>                 while (true) {
>                     int ch = input.read();
>                     if (ch < 0) {
>                     if (sb.length() == 0) {
>                         return;
>                     } else {
>                         break;
>                     }
>                     }
>                     sb.append((char) ch);
>                 }
>             responseDocument = builder.parse(new InputSource(
>                 new StringReader(sb.toString()) ));

IMO, that patch is bad, so I won't apply it. Basically, if the response body
is huge (and in DAV, that can easily happens), it would be yet another big
performance hit. If other people are having problems, we will need a
workaround.
On the tests I did with TC4 as the DAV server (and now IIS 5), it works
fine.

I use JAXP 1.1 (with Crimson), perhaps that's the reason why I don't have
this bug.

> Then, I can get the directory & file lists correctly on IIS 5.0.
> Nonetheless, not Apache with mod_dav and Zope Server.

Interoperability is only a secondary goal for the library. We'll work on it
eventually, though.

IIS works fine without those two patches on my setup (which is a standard
Win2k SP1 box - with JDK 1.3). However, I had to add a content-type header
to have it working (before, it was returning 400). I'll commit that in a few
minutes.

Remy

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic