On Mon, Apr 26, 2004 at 07:48:11PM -0400, Jorge Arellano Cid wrote:
On Thu, 22 Apr 2004, Jens Arm wrote:
Please test our current CVS hardly, and tell us how it did.
Directories like
http://fy.chalmers.se/~appro/linux/DVD+RW/tools/
or others are not rendered correctly
Yes. This is a complex problem.
Apache (the web server), generates bad HTML for directory listings (at least 1.3.x series):
<PRE> is an inline container excluding:
{IMG, OBJECT, APPLET, BIG, SMALL, SUB, SUP, FONT, BASEFONT}
Also, it can't hold block elements (e.g. HR).
So there's a bug in having <HR> inside <PRE> and one bug per directory entry because <PRE> can't contain <IMG>.
http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9307 and http://nagoya.apache.org/bugzilla/show_bug.cgi?id=13351 suggest that the apache developers know, and it's not going to change in the 1.3 series. http://nagoya.apache.org/bugzilla/show_bug.cgi?id=10880 suggests that the default won't change in the 2.0 series, but there may be IndexOptions settings that the web server administrator can use to make it valid.
Parhaps the 2.x.x Apache series produces XML. Does anyone know?
http://httpd.apache.org/docs-2.0/mod/mod_autoindex.html#indexoptions says that it can (2.0.49 and later) if the admin configures it that way. (I haven't verified it, though.)
After analizing the produced HTML for directory listings, I found that isolating the <HR> outside <PRE> is a trivial fix that helps keeping the block element outside.
That is:
- <HR> + </PRE><HR><PRE>
Very simple. It would allow for violations of the type "inline container with excluded inline element within" (instead of "inline container with a block inside").
Does anyone know an apache developer? It seems that sending the patch through bugzilla could take years to be noticed...
It can be a bit hit and miss. If one of the core team is directly interested and not otherwise engaged, they can get things done quickly. Their most recent attempt not to lose patches seems to be described in http://marc.theaimsgroup.com/?l=apache-httpd-dev&m=108012889313136&w=2 which suggests that bugzilla may be being watched closely.
OTOH, I don't like very much breaking our policies with code to handle bad HTML, and yes I know this is the most used web server. Maybe a dillorc option to enable a workaround for apache could do it, but I'd really like to talk with one of the developers.
Comments?
As others have said, any future change to apache won't change current servers for years to come. So rendering it usefully, if not ideally, would be prudent. And a big black mark in the bug meter is in order, too. Correctness vs usefulness... f -- Francis Daly francis@daoine.org