www-apache-bugdb mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Tony Finch <...@dotat.at>
Subject Re: apache-api/6728: Need Apache API function to Access HTTP Environment variabl
Date Tue, 24 Oct 2000 15:40:01 GMT
The following reply was made to PR apache-api/6728; it has been noted by GNATS.

From: Tony Finch <dot@dotat.at>
To: apbugs@apache.org
Cc: Psahoo@phyve.com, TOKILEY@aol.com
Subject: Re: apache-api/6728: Need Apache API function to Access HTTP Environment variabl
Date: Tue, 24 Oct 2000 15:38:55 +0000

 TOKILEY@aol.com wrote:
 >
 > You don't need the Apache API to get an environment variable.
 
 Yes you do. Apache doesn't use the usual environment mechanisms
 internally. Please don't answer bug reports with incorrect
 information.
 
 Psahoo@phyve.com wrote:
 >
 >I have developed own apache module for security and authorization system. I 
 >am using Entrust Proxy Server to secure our apache web server. I need to 
 >access HTTP environment varibale using Apache API.
 
 Look at mod_include.c for an example: You set up the contents of the
 environment table like this:
 
         ap_add_common_vars(r);
         ap_add_cgi_vars(r);
 
 Then you look up the value like this:
 
         val = ap_table_get(r->subprocess_env, var);
 
 >How can I access HTTP Environment  Variable using  Apache API?Which Apache 
 >API function require to find out the value of HTTP Environment varibale like 
 >HTTP_COOKIE , HTTP_ACCEPT, QUERY_STRING, REMOTE_ADDR, PATH, REQUEST_URI, 
 >SERVER_ADDR, etc..
 
 However, when using the C API most of this information can be accessed
 more efficiently by pulling it out of the request_rec. The HTTP_
 variables come from the headers table, e.g.
 
         ap_table_get(r->headers_in, "Host");
 
 and the parts of the URI is accessible from various elements like
 r->args (corresponding to QUERY_STRING).
 
 Look at the source for ap_add_common_vars and ap_add_cgi_vars for
 further examples of the C API equivalents to the CGI environment
 variables.
 
 Tony.
 -- 
 en oeccget g mtcaa    f.a.n.finch
 v spdlkishrhtewe y    dot@dotat.at
 eatp o v eiti i d.    fanf@covalent.net

Mime
View raw message