You are viewing a plain text version of this content. The canonical link for it is here.
Posted to apache-bugdb@apache.org by Lloyd Wood <L....@surrey.ac.uk> on 2000/05/28 20:08:14 UTC

general/6126: The template for generating directory listing includes a DOCTYPE

>Number:         6126
>Category:       general
>Synopsis:       The template for generating directory listing includes a DOCTYPE
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    apache
>State:          open
>Class:          change-request
>Submitter-Id:   apache
>Arrival-Date:   Sun May 28 11:10:00 PDT 2000
>Closed-Date:
>Last-Modified:
>Originator:     L.Wood@surrey.ac.uk
>Release:        all
>Organization:
apache
>Environment:
All
>Description:
Directory listings utilise README.html and HEADER.html
to include directory-specific information. The Apache server begins
the combined output page - HEADER.html (if present), files/dirs, README.html
(if present)- with a 3.2 DOCTYPE, yet there is no guarantee that whatever
the user chooses to put in the README.html or HEADER.html files is at all
compliant with that DOCTYPE.
>How-To-Repeat:
View source on:

http://www.apache.org/dist/

edit HEADER.html or README.html to anything you like. Add some javascript,
some layer tags, and run through the W3C validator.
Admire pointless 3.2 DOCTYPE.

(I note the default 404notfound page - http://www.surrey.ac.uk/blah say - 
has a 2.0 DOCTYPE. Just how many different doctype references are scattered
throughout apache?)
>Fix:
You could:
a) Only output the 3.2 DOCTYPE for directory listings
   if README.html and HEADER.html aren't present.
b) Just leave out the DOCTYPE entirely, since it's probably completely
    useless as far as directory listings go.
c) Change the doctype to 4.01 transitional and hope for the best.
d) build a parser/validator into apache to examine the HEADER.html and
   README.html files and output the appropriate doctype.

I vote b) as the simplest fix; the least misleading option.

a) is possible, but far too much like hard work.
c) is a kludge. d) is ridiculous.
>Release-Note:
>Audit-Trail:
>Unformatted:
 [In order for any reply to be added to the PR database, you need]
 [to include <ap...@Apache.Org> in the Cc line and make sure the]
 [subject line starts with the report component and number, with ]
 [or without any 'Re:' prefixes (such as "general/1098:" or      ]
 ["Re: general/1098:").  If the subject doesn't match this       ]
 [pattern, your message will be misfiled and ignored.  The       ]
 ["apbugs" address is not added to the Cc line of messages from  ]
 [the database automatically because of the potential for mail   ]
 [loops.  If you do not include this Cc, your reply may be ig-   ]
 [nored unless you are responding to an explicit request from a  ]
 [developer.  Reply only with text; DO NOT SEND ATTACHMENTS!     ]