Received: (qmail 34098 invoked by uid 501); 23 Oct 2000 19:17:37 -0000 Message-Id: <20001023191736.34097.qmail@locus.apache.org> Date: 23 Oct 2000 19:17:36 -0000 From: Prasanta Sahoo Reply-To: Psahoo@phyve.com To: submit@bugz.apache.org Subject: Need Apache API function to Access HTTP Environment variable X-Send-Pr-Version: 3.110 >Number: 6728 >Category: apache-api >Synopsis: Need Apache API function to Access HTTP Environment variable >Confidential: no >Severity: critical >Priority: medium >Responsible: apache >State: closed >Quarter: >Keywords: >Date-Required: >Class: sw-bug >Submitter-Id: apache >Arrival-Date: Mon Oct 23 12:20:00 PDT 2000 >Closed-Date: Tue Oct 24 08:41:07 PDT 2000 >Last-Modified: Tue Oct 24 08:41:07 PDT 2000 >Originator: Psahoo@phyve.com >Release: 1.3.9 >Organization: >Environment: Hi , 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. 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.. I have also own HTTP Environment Varibale called HTTP_ENTRUST_CLIENT.How can I get the value of that variable.? I want to use Apache API. Is there any change require in httpd configuration file? I am looking for early reply. Regards Prasanta 650-620-5204(office) >Description: No core dump >How-To-Repeat: >Fix: I need Apache API >Release-Note: >Audit-Trail: From: Tony Finch 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 State-Changed-From-To: open-closed State-Changed-By: fanf State-Changed-When: Tue Oct 24 08:41:07 PDT 2000 State-Changed-Why: Not a bug. The submitter's question has been answered. >Unformatted: [In order for any reply to be added to the PR database, you need] [to include in the Cc line and make sure the] [subject line starts with the report component and number, with ] [or without any 'Re:' prefixes (such as "general/1098:" or ] ["Re: general/1098:"). If the subject doesn't match this ] [pattern, your message will be misfiled and ignored. The ] ["apbugs" address is not added to the Cc line of messages from ] [the database automatically because of the potential for mail ] [loops. If you do not include this Cc, your reply may be ig- ] [nored unless you are responding to an explicit request from a ] [developer. Reply only with text; DO NOT SEND ATTACHMENTS! ]