--- libxml2-2.9.1/HTMLparser.c	2013-02-27 06:08:48.000000000 +0100
+++ libxml2-2.9.1-fix-push/HTMLparser.c	2013-11-28 21:24:07.000000000 +0100
@@ -5991,7 +5991,7 @@
 		ctxt->sax->endDocument(ctxt->userData);
 	}
     }
-    if ((ctxt->myDoc != NULL) &&
+    if ((!(ctxt->options & HTML_PARSE_NODEFDTD)) && (ctxt->myDoc != NULL) &&
 	((terminate) || (ctxt->instate == XML_PARSER_EOF) ||
 	 (ctxt->instate == XML_PARSER_EPILOG))) {
 	xmlDtdPtr dtd;
--- libxml2-2.9.1/xmllint.c	2013-03-27 04:31:47.000000000 +0100
+++ libxml2-2.9.1-fix-push/xmllint.c	2013-11-28 21:22:57.000000000 +0100
@@ -2202,6 +2202,7 @@
             if (res > 0) {
                 ctxt = htmlCreatePushParserCtxt(NULL, NULL,
                             chars, res, filename, XML_CHAR_ENCODING_NONE);
+                xmlCtxtUseOptions(ctxt, options);
                 while ((res = fread(chars, 1, pushsize, f)) > 0) {
                     htmlParseChunk(ctxt, chars, res, 0);
                 }
