Apache Mod-Python - Commented: (MODPYTHON-144) Make

This is Interesting: Free IT Magazines  
Home > Archive > Apache Mod-Python > March 2006 > Commented: (MODPYTHON-144) Make





You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

Author Commented: (MODPYTHON-144) Make
Graham Dumpleton (JIRA)

2006-03-11, 2:45 am

[ http://issues.apache.org/jira/brows...action_12369965 ]

Graham Dumpleton commented on MODPYTHON-144:
--------------------------------------------

After doing some research, rather than being called "apache.server" should possibly be called "apache.main_server". This would reflect better that it refers to the main Apache server configuration. This is in contrast to "req.server" and "req.connection.b
ase_server".

Need to do some more research as to what really is the difference between these three ways of getting to the server object. All I understand so far is that "get_options()" and "get_config()" should return different stuff based on configuration in effect t
o that point.

At the moment my belief is that "apache.main_server" would reflect config set outside of all configuration containers, "req.connection.base_server" will be the combination of that for the main server and the virtual host, and "req.server" will be the comb
ination of that for the main server, virtual host and any containers traversed based on URL of the request.

> Make apache._server/apace._interpreter part of public API.
> ----------------------------------------------------------
>
> Key: MODPYTHON-144
> URL: http://issues.apache.org/jira/browse/MODPYTHON-144
> Project: mod_python
> Type: Improvement
> Components: core
> Reporter: Graham Dumpleton
> Assignee: Graham Dumpleton


>
> Within the mod_python.apache module there exists two private variables called "_server" and "_interpreter". These are initialised when an interpreter is first created. The variables are set to be an instance of the mod_python "serverobject" and the name

of the interpreter. In effect, these would be the same as are available to a request handler as "req.server" and "req.interpreter".
> The problem with those in the "req" object is that they are only available to the request handler. If these variables in the "mod_python.apache" module are made part of the public API, they would then be accessible by any code. Since "server.get_options

()" now exists and "server.get_config()" works properly, making these public would allow code running at global scope when a module is being imported to consult the server level config and/or options to customise their runtime behavour.
> Thus, proposed that these variables be renamed to "apache.server" and "apache.interpreter".


Sponsored Links






Free braindumps | Software forum | Database administration forum

Copyright 2003 - 2008 webservertalk.com