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/22 00:16:02 UTC

[PATCH] Sign Server Generated Pages (take 3)

After Roy said he disliked the email reference to the web administrator,
and after sparse comments from the other members, here comes my next
proposal.

The patch adds (optional) footer lines to
    1) built in apache error messages,
       (but not to user-defined ErrorDocs)
    2) ftp proxy directory listings
    3) http autoindex listings if no README footer is present (because
       a README is a better place to put information about the site and
       email addresses)

Rationale behind it:
    In a chain of proxies, often one server is misconfigured and returns
    an error message or an erroneous ftp proxy listing and the like. In
    the absence of the name of the server generating the error message,
    the user has no clue where exactly the error occurred. A footer line
	____________________
	Apache-1.3 Server at blah.com Port 80
    helps in these cases.

Realization:
    a new directive
	ServerSignature  off | on | email
	Default:  ServerSignature  off
	Context:  resource config, .htaccess
    lets the user choose from:
	off (default) behavior as before
	on            footer line "Apache-<vers> Server at <ServerName> Port <Port>
	email         like "on", but the <ServerName> is also a hypertext
		      link to "mailto:<ServerAdmin>"

What do you think of this approach?

    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] Sign Server Generated Pages (take 3)

Posted by Martin Kraemer <Ma...@mch.sni.de>.
Not 100% either. The </PRE> ought to be ouput before the signature is
printed. And there need only be one <HR>.

    Martin
On Sat, Nov 22, 1997 at 12:16:02AM +0100, Martin Kraemer wrote:
> diff -u -r /home/martin/apachen/apachen/src/modules/proxy/proxy_ftp.c ./modules/proxy/proxy_ftp.c
> --- /home/martin/apachen/apachen/src/modules/proxy/proxy_ftp.c	Fri Oct 24 01:53:39 1997
> +++ ./modules/proxy/proxy_ftp.c	Fri Nov 21 23:58:18 1997
> @@ -376,10 +393,19 @@
>  	    o += w;
>  	}
>      }
> -    bputs("</PRE><HR></BODY></HTML>\015\012", con->client);
.....Output </PRE> here, or </PRE><HR> if psignatore() returns ""
> +    site = psignature(r);
> +    if (site[0] != '\0') {
> +	bputs(site, con->client);
> +	if (f2 != NULL)
> +	    bputs(site, f2);
> +	total_bytes_sent += strlen(site);
> +    }
.....set site = "</BODY></HTML>\015\012";
> +    site = "</PRE><HR></BODY></HTML>\015\012";
> +    bputs(site, con->client);


-- 
| 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