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:4
Avg. Score:4.2 ± 0.8
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
View Add Comment Developer Edit
Welcome! If you don't have a Git account, you can't do anything here.
You can add a comment by following this link or if you reported this bug, you can edit this bug over here.
(description)
Block user comment
Status: Assign to:
Package:
Bug Type:
Summary:
From: bfrance@php.net
New email:
PHP Version: OS:

 

 [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-2024 The PHP Group
All rights reserved.
Last updated: Tue Mar 19 11:01:28 2024 UTC