Subject: | HTTP::DAV bug in propfind, dies on XML Parser getting invalid/incomplete xml |
Date: | Tue, 14 Feb 2012 14:56:54 -0800 |
To: | bug-HTTP-DAV [...] rt.cpan.org |
From: | Tmack <tmack0 [...] gmail.com> |
I am using HTTP::Dav to implement a spider for indexing. It works
nicely most of the time, but I have come across a problem where it
dies on a $dav->propfind, killing the spider, leaving an error from
XML::Parser regarding a missing element (error pasted below) on
stderr. I haven't yet dug deeper into it, but believe this is from the
webserver (Apache) being restarted mid prop-find (or other general
failure on the webserver), causing the propfind to get an incomplete
return, and then passing it to the XML Parser without verifying its
completeness. Perhaps the XML should be validated prior to sending it
to XML::parser and either return an error on invalid XML or it should
retry the propfind request to the server and warn on the problem?
To get around this I currently am wrapping all $dav->propfind calls in
an eval block and retrying on failure.
Error output:
no element found at line 14393, column 0, byte 622696 at
/usr/lib/perl5/XML/Parser.pm line 187
Thanks
Theral Mackey