httpd-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Micha Lenk <mi...@lenk.info>
Subject [PATCH] mod_proxy_html removes the <!doctype> tag and breaks XHTML documents
Date Wed, 19 Mar 2014 20:19:38 GMT
Hi Apache developers,

the next patch fixes the behavior of mod_proxy_html to remove any 
<!doctype> tags from the beginning of HTML and XHTML documents. (Thomas, 
Ewald, this is issue #19803 in our Mantis). This <!doctype> tag is 
needed by some browsers to correctly render XHTML documents.

Additionally it fixes the issue in XHTML documents that empty tags don't 
get terminated correctly unless "ProxyHTMLDoctype XHTML" is explicitly 
configured (Thomas, Ewald, this is issue #17643 in our Mantis).

The attached patch fixes the first issue by using the internalSubset 
hook of the libxml2 SAX parser to parse and output the <!doctype> tag. 
To address the second issue, the same hook is used to automatically 
detect whether the current document is an XHTML document or not. In case 
of an XHTML document the XHTML-style for closing empty tags is enabled 
for the current request. In my opinion the suggested patch makes the 
directive ProxyHTMLDoctype more or less obsolete. Of course it is kept 
for backwards compatibility.

The patch is based on httpd trunk, rev. 1579365.

Please provide feedback whether I should file an issue in Apaches 
Bugzilla or whether this isn't needed in this case.

Regards,
Micha

Mime
View raw message