php.net |  support |  documentation |  report a bug |  advanced search |  search howto |  statistics |  random bug |  login
Request #44823 SAPI way to access request_rec data
Submitted: 2008-04-24 20:30 UTC Modified: -
Votes:3
Avg. Score:4.7 ± 0.5
Reproduced:2 of 3 (66.7%)
Same Version:0 (0.0%)
Same OS:0 (0.0%)
From: bfrance@php.net Assigned:
Status: Open Package: Feature/Change Request
PHP Version: 5.3CVS-2008-04-24 (CVS) OS:
Private report: No CVE-ID: None
Have you experienced this issue?
Rate the importance of this bug to you:

 [2008-04-24 20:30 UTC] bfrance@php.net
Description:
------------
We have a (really lots) shared extension that require access to the request_rec, but also need to run under either apache 1 or the apache 2 SAPI.

Could we get SAPI function for access (both get and set) the request_rec data, such as:

r->headers_in
r->headers_out
r->subprocess_env
r->notes


Reproduce code:
---------------
Right now we do things like:

request_rec *r = (request_rec *) SG(server_context);

if (r != NULL) {
  const char *foo = ap_table_get(r->subprocess_env, "foo");
}

this means we have to build a version of the extension for apache 1 and apache 2.

Expected result:
----------------
I would like to do something like this (where XXXX is some new function for r->subprocess_env access):


const char *foo = sapi_XXXX_get("foo");

or 

sapi_XXXX_set("foo", "bar");

This way we could build one sapi module for apache 1 and one for apache 2, but a single shared extension that would work with either.



Patches

Add a Patch

Pull Requests

Add a Pull Request

 
PHP Copyright © 2001-2020 The PHP Group
All rights reserved.
Last updated: Sun Apr 05 19:01:30 2020 UTC