Hi - I have a problem which I can't seem to solve.

I am busy implementing a webdav solution in mod_perl and as you may
know, the output is XML based.

The problem is that the output generated by mod_perl contains
additional characters before and after the XML which the webdav
clients don't seem to like.

If I convert this script to a CGI, it works 100% and the extra
characters is not present.

Any ideas?

Here is the example trace (check the "20d" and "0" before and after the XML):

PROPFIND /webdav/ HTTP/1.1
Host: test:81
User-Agent: cadaver/0.22.3 neon/0.25.5
Connection: TE
TE: trailers
Depth: 0
Content-Length: 297
Content-Type: application/xml
Authorization: Basic dGVzdHVzZXIxOnBhc3N3b3Jk

<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:"><prop>
<getcontentlength xmlns="DAV:"/>
<getlastmodified xmlns="DAV:"/>
<executable xmlns="http://apache.org/dav/props/"/>
<resourcetype xmlns="DAV:"/>
<checked-in xmlns="DAV:"/>
<checked-out xmlns="DAV:"/>
</prop></propfind>

HTTP/1.1 200 OK
Date: Wed, 22 Sep 2010 04:25:57 GMT
Server: Apache/2.2.3 (CentOS)
Cache-Control: max-age=0
Expires: Wed, 22 Sep 2010 04:25:57 GMT
Connection: close
Transfer-Encoding: chunked
Content-Type: text/xtml; charset="utf-8"

20d
<?xml version="1.0" encoding="utf-8"?>
<D:multistatus xmlns:D="DAV:"><D:response xmlns:lp1="DAV:"
xmlns:lp2="http://apache.org/dav/props/";>
<D:href></D:href><D:propstat><D:prop>
<lp1:resourcetype><D:collection/></lp1:resourcetype>
<lp1:getlastmodified>2010-09-14T05:09:29Z</lp1:getlastmodified>
<lp1:executable>F</lp1:executable>
<lp1:getcontentlength>4096</lp1:getcontentlength>
<D:checked-in />
<D:checked-out />
<D:lockdiscovery/>
</D:prop>
<D:status>HTTP/1.1 200 OK</D:status>
</D:propstat>
</D:response>
</D:multistatus>
0

Reply via email to