Bug 62989 - HTML generated by Apache httpd itself is often invalid or uses ancient doctypes (and patches to fix that)
Summary: HTML generated by Apache httpd itself is often invalid or uses ancient doctyp...
Status: NEW
Alias: None
Product: Apache httpd-2
Classification: Unclassified
Component: All (show other bugs)
Version: 2.4.37
Hardware: All All
: P2 normal (vote)
Target Milestone: ---
Assignee: Apache HTTPD Bugs Mailing List
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-12-07 09:38 UTC by Andra Farkas
Modified: 2019-01-24 10:58 UTC (History)
1 user (show)



Attachments
Patch that adds important doctypes to the doctype defines (746 bytes, patch)
2018-12-07 09:38 UTC, Andra Farkas
Details | Diff
Change doctype in http_protocol.c (458 bytes, patch)
2018-12-07 09:40 UTC, Andra Farkas
Details | Diff
Make the "It works!" page valid HTML (417 bytes, patch)
2018-12-07 09:40 UTC, Andra Farkas
Details | Diff
Change doctype in mod_autoindex.c (518 bytes, patch)
2018-12-07 09:41 UTC, Andra Farkas
Details | Diff
Change doctype in mod_dav.h (677 bytes, patch)
2018-12-07 09:42 UTC, Andra Farkas
Details | Diff
Change doctype in mod_example_hooks.c (543 bytes, patch)
2018-12-07 09:42 UTC, Andra Farkas
Details | Diff
Change doctype in mod_imagemap.c (500 bytes, patch)
2018-12-07 09:43 UTC, Andra Farkas
Details | Diff
Change doctype in mod_proxy_balancer.c (504 bytes, patch)
2018-12-07 09:44 UTC, Andra Farkas
Details | Diff
Change doctype in mod_proxy_ftp.c (503 bytes, patch)
2018-12-07 09:44 UTC, Andra Farkas
Details | Diff
Change doctype in mod_status.c (439 bytes, patch)
2018-12-07 09:45 UTC, Andra Farkas
Details | Diff
Change doctype in util_ldap.c (478 bytes, patch)
2018-12-07 09:45 UTC, Andra Farkas
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Andra Farkas 2018-12-07 09:38:23 UTC
Created attachment 36299 [details]
Patch that adds important doctypes to the doctype defines

Hello!
I noticed that most of the time, when Apache httpd itself generates HTML output (like for 404 pages and autoindex pages) it uses ancient HTML 2.0 and HTML 3.2 doctypes.
These 11 attached diffs update those. The most important of these diffs is httpdh.diff
I compiled and tested these diffs, and everything I tested works fine! Browsers now render those pages in standards mode rather than quirks mode.
While I made these patches for httpd 2.4.37 these patches would likely also be useful for trunk.
This could be the first step in making sure all the HTML output is more valid.
I also originally sent this here:
https://lists.apache.org/thread.html/e906a9ac878dc7de35d875006b6714c9fc8b0812e6780c8286fe6c66@%3Cdev.httpd.apache.org%3E
Thanks for reading!
Comment 1 Andra Farkas 2018-12-07 09:40:11 UTC
Created attachment 36300 [details]
Change doctype in http_protocol.c
Comment 2 Andra Farkas 2018-12-07 09:40:39 UTC
Created attachment 36301 [details]
Make the "It works!" page valid HTML
Comment 3 Andra Farkas 2018-12-07 09:41:24 UTC
Created attachment 36302 [details]
Change doctype in mod_autoindex.c
Comment 4 Andra Farkas 2018-12-07 09:42:03 UTC
Created attachment 36303 [details]
Change doctype in mod_dav.h
Comment 5 Andra Farkas 2018-12-07 09:42:36 UTC
Created attachment 36304 [details]
Change doctype in mod_example_hooks.c
Comment 6 Andra Farkas 2018-12-07 09:43:27 UTC
Created attachment 36305 [details]
Change doctype in mod_imagemap.c
Comment 7 Andra Farkas 2018-12-07 09:44:11 UTC
Created attachment 36306 [details]
Change doctype in mod_proxy_balancer.c
Comment 8 Andra Farkas 2018-12-07 09:44:37 UTC
Created attachment 36307 [details]
Change doctype in mod_proxy_ftp.c
Comment 9 Andra Farkas 2018-12-07 09:45:02 UTC
Created attachment 36308 [details]
Change doctype in mod_status.c
Comment 10 Andra Farkas 2018-12-07 09:45:27 UTC
Created attachment 36309 [details]
Change doctype in util_ldap.c
Comment 11 Andra Farkas 2018-12-20 05:25:29 UTC
Ping.
Comment 12 Stefan Eissing 2019-01-24 09:47:08 UTC
I agree that updating doc types here is good. And we can add the patches to trunk easily. 

However, I think we cannot backport them for a 2.4.x release. There are screenscrapers out there and expierience tells me that we would break at least one that is really important to someone.

Would you agree?
Comment 13 Mario 2019-01-24 10:15:46 UTC
+1
Comment 14 Andra Farkas 2019-01-24 10:58:51 UTC
(In reply to Stefan Eissing from comment #12)
> I agree that updating doc types here is good. And we can add the patches to
> trunk easily. 
> 
> However, I think we cannot backport them for a 2.4.x release. There are
> screenscrapers out there and expierience tells me that we would break at
> least one that is really important to someone.
> 
> Would you agree?

Sure!  If this patch gets into trunk, I'd be happy. :D

If I need to re-do the diffs for trunk, let me know, and let me know the best way to get the trunk code onto my computer so I can do it.