You are viewing a plain text version of this content. The canonical link for it is here.
Posted to modules-dev@httpd.apache.org by Arturo 'Buanzo' Busleiman <bu...@buanzo.com.ar> on 2007/05/21 15:54:47 UTC
ap_add_version_component
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Hi group!
I wanted my module to announce itself on the Server: response header, so I checked mod_ssl's source,
found ap_add_version_component(), and some googling provided the 1.3 version of the
ap_add_version_component() call manual.
It had only one const char* argument, but when I compile my module I get "too few arguments"... I
can't seem to find any details about ap_add_version_component specifically for 2.x.
Additionally, any "best practice" for this? Where should I add the code, in which hook? Post-config?
Sincerely,
Buanzo
- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
OpenPGP for HTTP: New Web-Auth Scheme: http://freshmeat.net/articles/view/2599
Consulting and Secure Mail Hosting: http://www.buanzo.com.ar/pro/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGUaSnAlpOsGhXcE0RCkm+AJwJmqm8HzEaxnK2u9ExjysGGhRMHACbBlzm
AZLhJ4rfmyZD3cUSmh7Mzj4=
=JF+a
-----END PGP SIGNATURE-----
Re: ap_add_version_component
Posted by Joe Lewis <jo...@joe-lewis.com>.
Arturo 'Buanzo' Busleiman wrote:
> Joe Lewis wrote:
>
>> It takes two arguments. The first should be the pool from the
>>
> [...]
>
>> static int mod_example_post_config(apr_pool_t * p,apr_pool_t *
>>
>
> damn, i should pay more attention to mod_example... thank you very much for your time Joe, I'm sorry
> I've bothered the list with something I could've found myself. Sorry!
>
I'm not sure it's in THE "mod_example". That was a demo module I'd
fooled around with in output filtering, so the
ap_add_version_component() function isn't in the example module. (In
fact, that function is a slightly different name, but it should still
suffice to show you what you need to do).
Joe
--
Joseph Lewis <http://sharktooth.org/>
"Divide the fire, and you will sooner put it out." - Publius Syrus
Re: ap_add_version_component
Posted by Arturo 'Buanzo' Busleiman <bu...@buanzo.com.ar>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512
Joe Lewis wrote:
> It takes two arguments. The first should be the pool from the
[...]
> static int mod_example_post_config(apr_pool_t * p,apr_pool_t *
damn, i should pay more attention to mod_example... thank you very much for your time Joe, I'm sorry
I've bothered the list with something I could've found myself. Sorry!
- --
Arturo "Buanzo" Busleiman - Consultor Independiente en Seguridad Informatica
OpenPGP for HTTP: New Web-Auth Scheme: http://freshmeat.net/articles/view/2599
Consulting and Secure Mail Hosting: http://www.buanzo.com.ar/pro/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org
iD8DBQFGUapzAlpOsGhXcE0RCjKdAJ9+7YY6wuciPR5SOsRxm/Cg2WmtJgCfe/mQ
2+41RF36AupR4uGUa8xb4Hg=
=tZ7D
-----END PGP SIGNATURE-----
Re: ap_add_version_component
Posted by Joe Lewis <jo...@joe-lewis.com>.
Arturo 'Buanzo' Busleiman wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA512
>
> Hi group!
>
> I wanted my module to announce itself on the Server: response header, so I checked mod_ssl's source,
> found ap_add_version_component(), and some googling provided the 1.3 version of the
> ap_add_version_component() call manual.
>
> It had only one const char* argument, but when I compile my module I get "too few arguments"... I
> can't seem to find any details about ap_add_version_component specifically for 2.x.
>
It takes two arguments. The first should be the pool from the
post_config hook. e.g. :
ap_add_version_component(p, "mod_example/1.0");
as called from :
static int mod_example_post_config(apr_pool_t * p,apr_pool_t *
plog,apr_pool_t * ptemp,server_rec * s);
and that should add the string to the server signature.
Joe
--
Joseph Lewis <http://sharktooth.org/>
"Divide the fire, and you will sooner put it out." - Publius Syrus