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 "m.spinetti@pisa.iol.it" <m....@pisa.iol.it> on 2006/10/20 18:30:59 UTC

Question about ap_get_module_config

Hi all,
I have a question about ap_get_module_config.
My module has to connect to different url to get the content.
So I was thinking to initialize my struct (in which I have different
information for example an array with the addresses of the url to get
the contents) in the server config.
The I wanted in the handler get my struct with ap_get_module_config and
then using it. 
My question is this: each element of the struct has some fields which is
filled by each child and it's different from child to child. For example
the content of url, the connection time and so on. 
So if I get the struct with ap_get_module_config, is it safe to modify
it? Or it's better to make a copy of it?
Best regards,

Marco



Re: Question about ap_get_module_config

Posted by Nick Kew <ni...@webthing.com>.
On Friday 20 October 2006 17:30, m.spinetti@pisa.iol.it wrote:
> Hi all,
> I have a question about ap_get_module_config.

That serves two purposes, and I think you're confusing them.

For your server configuration, you'll use it with r->per_dir_config
or s->module_config.  Those should generally be treated as
read-only when processing a request.

For per-request data, you use it with r->request_config.

See my .sig for more.

-- 
Nick Kew

Application Development with Apache - the Apache Modules Book
http://www.apachetutor.org/