You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@httpd.apache.org by Martin Kraemer <Ma...@mch.sni.de> on 1997/11/03 18:41:09 UTC

[PATCH] "Signing" server generated pages

Server generated pages (like, e.g., error messages, AutoIndexes and FTP
listings) should IMHO be "signed" by the apache server generating the
reply. This helps users to track down the server which is causing
problems (if there are problems), especially in a proxy chain where it is
otherwise unclear exactly which apache generated the error response.

In the past, the FTP proxy used to generate a footer which contained a
HTML reference to apache.org - this patch does NOT try to resurrect this
"feature" ;-)  Instead, the "causing server" and its webmaster mail
address are added to the server pages, like in (simple dir listing):

    Index of /blah
     o Parent Directory
     o buildmark.c
     o modules.c
    -----------------------------------------------------
    Apache/1.3b3-dev PHP/FI-2.0b12 at _pgtm0035.mch.sni.de_ Port 80

Is that a useful fix?

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

Re: [PATCH] "Signing" server generated pages

Posted by Brian Behlendorf <br...@organic.com>.
At 05:41 PM 11/4/97 +0100, Martin Kraemer wrote:
>> How about something Squid-like?
>> 
>>   "Generated by Apache/1.3b3@www.foo.bar"
>
>Hmm... -0.5

Yeah, just think of all the spam mail that address will receive. 

	Brian


--=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=--
"it's a big world, with lots of records to play." - sig   brian@organic.com

Re: [PATCH] "Signing" server generated pages

Posted by Martin Kraemer <Ma...@mch.sni.de>.
On Mon, Nov 03, 1997 at 09:59:49PM +0100, Lars Eilebrecht wrote:
> I like the idea, but only if we talk about error-pages and FTP listings.
> IMHO it may not look good on directory listings if a README is included
> at the bottom.

Yes, I thought about that as well -- I wanted to include the footer only
if no README was present. But look at the code:

    if (autoindex_opts & FANCY_INDEXING) {
	if ((tmp = find_readme(autoindex_conf, r)))
	    insert_readme(name, tmp, "", HRULE, END_MATTER, r);
	else {
	    rputs("</UL>", r);  /* XXX: @@@@ This is bogus - there was no UL */
	}
    }
The </UL> is bogus because it doesn't close any pending <UL>.
OTOH, with or without a README file, I never succeeded in getting apache
to execute this rputs() statement at all! I had tried to add my footer
there, but it never appeared.

So: BIG question to everyone:
WHY IS the else-branch of "if (..find_readme(...))" never executed?
Anyone?

> Maybe you should only use SERVER_BASEVERSION instead of SERVER_VERSION,
> because the SUBVERSION can get very long in some cases.

    Done.

> How about something Squid-like?
> 
>   "Generated by Apache/1.3b3@www.foo.bar"

Hmm... -0.5

    Martin
-- 
| S I E M E N S |  <Ma...@mch.sni.de>  |      Siemens Nixdorf
| ------------- |   Voice: +49-89-636-46021     |  Informationssysteme AG
| N I X D O R F |   FAX:   +49-89-636-44994     |   81730 Munich, Germany
~~~~~~~~~~~~~~~~My opinions only, of course; pgp key available on request

RE: [PATCH] "Signing" server generated pages

Posted by Lars Eilebrecht <La...@unix-ag.org>.
According to Martin Kraemer:

>      -----------------------------------------------------
>      Apache/1.3b3-dev PHP/FI-2.0b12 at _pgtm0035.mch.sni.de_ Port 80
>  
>  Is that a useful fix?

I like the idea, but only if we talk about error-pages and FTP listings.
IMHO it may not look good on directory listings if a README is included
at the bottom.

Maybe you should only use SERVER_BASEVERSION instead of SERVER_VERSION,
because the SUBVERSION can get very long in some cases.

How about something Squid-like?

  "Generated by Apache/1.3b3@www.foo.bar"


ciao...
-- 
Lars Eilebrecht                         - If you can't do it, fake it.
sfx@unix-ag.org
http://www.si.unix-ag.org/~sfx/