{
public:
DAVMultiStatusPrivate() :
- parserInited(false)
+ parserInited(false),
+ valid(false)
{
rootResource = NULL;
}
}
bool parserInited;
+ bool valid;
XML_Parser xmlParser;
DAVResource* rootResource;
XML_ParserFree(_d->xmlParser);
_d->parserInited = false;
+ _d->valid = false;
}
}
void DAVMultiStatus::finishParse()
{
if (_d->parserInited) {
- XML_Parse(_d->xmlParser, NULL, 0, true);
+ if (!XML_Parse(_d->xmlParser, NULL, 0, true)) {
+ SG_LOG(SG_IO, SG_WARN, "DAV parse error:" << XML_ErrorString(XML_GetErrorCode(_d->xmlParser))
+ << " at line:" << XML_GetCurrentLineNumber(_d->xmlParser)
+ << " column " << XML_GetCurrentColumnNumber(_d->xmlParser));
+ _d->valid = false;
+ } else {
+ _d->valid = true;
+ }
XML_ParserFree(_d->xmlParser);
}
return _d->rootResource;
}
+bool DAVMultiStatus::isValid() const
+{
+ return _d->valid;
+}
+
{
if (responseCode() == 207) {
_davStatus.finishParse();
- _repo->propFindComplete(this, (DAVCollection*) _davStatus.resource());
+ if (_davStatus.isValid()) {
+ _repo->propFindComplete(this, (DAVCollection*) _davStatus.resource());
+ } else {
+ _repo->propFindFailed(this, SVNRepository::SVN_ERROR_SOCKET);
+ }
}
}