|
Posted by Nick Kew on August 23, 2007, 7:56 pm
Please log in for more thread options
On Thu, 23 Aug 2007 21:32:34 +0200
> Andy Dingley wrote:
>=20
> > So WTF is Excel doing there? Just serve plain text or HTML. Why
> > not use Apache's perfectly capable indexing facilities anyway ?
> >
>=20
> IIRC, this "perfectly capable" indexing facility generate invalid tag
> soup with IMG and HR inside a PRE element.
Details, please. If Apache does that, we should know.
[Not counting the junk that gets shipped with certain distros under
such preposterous names as "advanced extranet server"].
--=20
Nick Kew
Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/
|
|
Posted by André Gillibert on August 24, 2007, 1:29 pm
Please log in for more thread options
Nick Kew wrote:
> Details, please. If Apache does that, we should know.
>
I noticed that with Apache 2.0.54, *by default*, directory indexing
produces an ugly PRE element containing an HR element as well as one IMG
for every file.
Moreover using PRE for tabular data in an HTML 3.2 document is ugly. HTML
3.2 has tables.
As a sample: Look at the source code at that URI:
http://www.apache.org/dist/httpd/binaries/ It's generated by Apache 2.3.0 (August 24, 2007, 17:00 UTC).
However, I looked at the source code of Apache 2.2.4 (the latest stable
release) that I directly downloaded from apache.org.
The C file httpd-2.2.4/module/generators/mod_autoindex.c contains the
guilty tag soup generator.
I noticed that a tabular layout, with proper HTML tables, was generated if
a flag TABLE_INDEXING was set.
So, I read (searched into) the friendly manual (I should have started with
that, but was too lazy), and quickly found that the parameter HTMLTable of
the option IndexOptions, activates the "good" index generator.
http://httpd.apache.org/docs/2.2/mod/mod_autoindex.html#indexoptions
It's marked as "Experimental, Apache 2.0.23 and later", but it works quite
well.
My statement about tag soup was mainly related to the fact everytime I see
an Apache directory on the WWW (in Year 2007), it uses the old PRE tag
soup....
As you see, Apache's website is not exception to this rule.
But, that doesn't change the fact that Apache can generate valid HTML code
(which seems to be conforming, tough there's one ugly thing with <hr>), if
fed with the right options.
So, there's no reason not to use the Apache indexing facility on releases
over 2.0.23.
PS: All the tests have been done on GNU/Linux, in an i386 environment,
with the Fedora Core 4 distro.
--
|
|
Posted by Dan on August 18, 2007, 12:08 pm
Please log in for more thread options
> <a href="/files/myOutput.xls">Download myOutput.xls Now! (100kb
> ZIP)</a>
If it's a .xls file (yuck, M$ proprietary!), why does the link text
claim it's a ZIP?
--
Dan
|
| Similar Threads | Posted | | epp - ie6 changes file name on download | March 10, 2005, 1:18 pm |
| PDF "File Download" window? | September 18, 2004, 5:06 pm |
| force download of a file | February 3, 2006, 2:43 pm |
| "You don't have permission": Why won't this file download? | August 31, 2008, 2:55 pm |
| Help: Download and Display a Text File | January 1, 2005, 1:15 am |
| the web browser asks me if I want to download my index.htm file,instead of showing it | July 30, 2004, 2:29 pm |
| Re: the web browser asks me if I want to download my index.htm file,instead of showing it | July 30, 2004, 7:05 pm |
| Web service -> IIS and Apache rendering | November 15, 2004, 10:59 am |
| Apache Content negotiation with Chinese zh-TW and zh-CN | August 4, 2006, 3:11 pm |
| mime types in Apache and the validator | June 6, 2008, 7:58 am |
|