You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cli-dev@httpd.apache.org by Jeff White <jl...@earthlink.net> on 2004/11/18 21:46:30 UTC
Add mod to server name
In mod_aspdotnet should there be
an add to the server name action,
(like Perl and PHP)?
If so then in mod_aspdotnet there is
in the function - static void register_hooks(...)
this call:
ap_hook_post_config(asp_net_post_config,
NULL, NULL, APR_HOOK_MIDDLE);
so add in static int asp_net_post_config(...)
{
// Add one time only
// Get .NET version
version=current .NET version
// ap_add_version_component(p, ".NET1/1");
// Add .Net to the server's name.
ap_add_version_component(p, ".NETversion");
and then so on...
return OK;
}
Or if Apache can use many
ap_hook_post_config(...) calls,
try a separate function.
ap_hook_post_config(add_NET_to_server,
NULL, NULL, APR_HOOK_MIDDLE);
Jeff
Re: Add mod to server name
Posted by "William A. Rowe, Jr." <wr...@rowe-clan.net>.
At 02:46 PM 11/18/2004, Jeff White wrote:
>In mod_aspdotnet should there be
>an add to the server name action,
>(like Perl and PHP)?
>
> ap_add_version_component(p, ".NETversion");
Well, I'm thinking something like Apache/2.0 mod_aspdotnet/2.0
(we are at our 2.0 flavor) - I've patched - thank you for the
proposal.
And perhaps,
X-Powered-By: ASP.NET
but if the user wants that header, mod_headers will let you
do it by hand;
Header Add X-Powered-By ASP.NET
so my inclination is to add that statement to our 'default config'
and admins can add it or ignore it as they like.
There's nothing else in the IIS/5.0 server string to reflect to
the client that ASP.NET or a specific .NET flavor is in use.
(Pretty funny, actually, when you consider the amount of spam
in the IE User-Agent header to the server, revealing exactly
which .NET flavors are installed on the client.)
Bill