Commit b8590d4c authored by Daniel Veillard's avatar Daniel Veillard
Browse files

fixed bug #164556 where non-fatal errors stopped push parsing and

* parser.c: fixed bug #164556 where non-fatal errors stopped
  push parsing and xmlreader.
* Makefile.am: fixup
* test/errors/webdav.xml result/errors/webdav*: adding regression
  test for this problem.
Daniel
parent f500aec5
Fri Jan 21 16:08:21 CET 2005 Daniel Veillard <daniel@veillard.com>
* parser.c: fixed bug #164556 where non-fatal errors stopped
push parsing and xmlreader.
* Makefile.am: fixup
* test/errors/webdav.xml result/errors/webdav*: adding regression
test for this problem.
Wed Jan 19 17:24:34 CET 2005 Kasimier Buchcik <libxml2-cvs@cazic.net>
 
* xmlschemas.c: Corrected targetNamespace in
......
......@@ -354,15 +354,14 @@ Errtests : xmllint$(EXEEXT)
echo New test file $$name ; \
$(CHECKER) $(top_builddir)/xmllint --stream $$i \
2> $(srcdir)/result/errors/$$name.str \
> $(srcdir)/result/errors/$$name ; \
> /dev/null ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
else \
log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > result.$$name ; \
log=`$(CHECKER) $(top_builddir)/xmllint --stream $$i 2> error.$$name > /dev/null ; \
grep "MORY ALLO" .memdump | grep -v "MEMORY ALLOCATED : 0"; \
diff $(srcdir)/result/errors/$$name result.$$name ; \
diff $(srcdir)/result/errors/$$name.str error.$$name` ; \
if [ -n "$$log" ] ; then echo $$name result ; echo $$log ; fi ; \
rm result.$$name error.$$name ; \
rm error.$$name ; \
fi ; fi ; done)
Docbtests : xmllint$(EXEEXT)
......
......@@ -9035,7 +9035,7 @@ xmlParseTryOrFinish(xmlParserCtxtPtr ctxt, int terminate) {
xmlParseGetLasts(ctxt, &lastlt, &lastgt);
while (1) {
if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
if ((ctxt->wellFormed != 1) && (ctxt->disableSAX == 1))
return(0);
......@@ -9837,7 +9837,7 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
int terminate) {
if (ctxt == NULL)
return(XML_ERR_INTERNAL_ERROR);
if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
if ((ctxt->wellFormed != 1) && (ctxt->disableSAX == 1))
return(ctxt->errNo);
if (ctxt->instate == XML_PARSER_START)
xmlDetectSAX2(ctxt);
......@@ -9879,7 +9879,7 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
}
}
xmlParseTryOrFinish(ctxt, terminate);
if ((ctxt->errNo != XML_ERR_OK) && (ctxt->disableSAX == 1))
if ((ctxt->wellFormed != 1) && (ctxt->disableSAX == 1))
return(ctxt->errNo);
if (terminate) {
/*
......@@ -9909,6 +9909,7 @@ xmlParseChunk(xmlParserCtxtPtr ctxt, const char *chunk, int size,
}
ctxt->instate = XML_PARSER_EOF;
}
if (ctxt->wellFormed) return(0);
return((xmlParserErrors) ctxt->errNo);
}
......
<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:"><prop>
<getcontentlength xmlns="DAV:"/>
<getlastmodified xmlns="DAV:"/>
<displayname xmlns="DAV:"/>
<executable xmlns="http://apache.org/dav/props/"/>
<resourcetype xmlns="DAV:"/>
</prop></propfind>
./test/errors/webdav.xml:2: parser warning : xmlns: DAV: not a valid URI
<propfind xmlns="DAV:"><prop>
^
./test/errors/webdav.xml:3: parser warning : xmlns: DAV: not a valid URI
<getcontentlength xmlns="DAV:"/>
^
./test/errors/webdav.xml:4: parser warning : xmlns: DAV: not a valid URI
<getlastmodified xmlns="DAV:"/>
^
./test/errors/webdav.xml:5: parser warning : xmlns: DAV: not a valid URI
<displayname xmlns="DAV:"/>
^
./test/errors/webdav.xml:7: parser warning : xmlns: DAV: not a valid URI
<resourcetype xmlns="DAV:"/>
^
./test/errors/webdav.xml:2: parser warning : xmlns: DAV: not a valid URI
<propfind xmlns="DAV:"><prop>
^
./test/errors/webdav.xml:3: parser warning : xmlns: DAV: not a valid URI
<getcontentlength xmlns="DAV:"/>
^
./test/errors/webdav.xml:4: parser warning : xmlns: DAV: not a valid URI
<getlastmodified xmlns="DAV:"/>
^
./test/errors/webdav.xml:5: parser warning : xmlns: DAV: not a valid URI
<displayname xmlns="DAV:"/>
^
./test/errors/webdav.xml:7: parser warning : xmlns: DAV: not a valid URI
<resourcetype xmlns="DAV:"/>
^
<?xml version="1.0" encoding="utf-8"?>
<propfind xmlns="DAV:"><prop>
<getcontentlength xmlns="DAV:"/>
<getlastmodified xmlns="DAV:"/>
<displayname xmlns="DAV:"/>
<executable xmlns="http://apache.org/dav/props/"/>
<resourcetype xmlns="DAV:"/>
</prop></propfind>
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment