mirror of
https://github.com/php/php-src.git
synced 2024-10-20 07:53:58 +00:00
d504de0f78
TODO: POST, cookies, "flushing", finalizing config framework (it works), http auth, PHP Hooks (apache_sub_req is there). Note that this code depends on some other commits which are pending.
24 lines
411 B
C
24 lines
411 B
C
#include "php_apache.h"
|
|
|
|
PHP_FUNCTION(apache_sub_req)
|
|
{
|
|
zval **p1;
|
|
request_req *rr;
|
|
php_struct *ctx;
|
|
SLS_FETCH();
|
|
|
|
if (ZEND_NUM_ARGS() != 1 || zend_get_parameters_ex(1, &p1) == FAILURE)
|
|
WRONG_NUM_ARGS;
|
|
|
|
convert_to_string_ex(p1);
|
|
|
|
ctx = SG(server_context);
|
|
rr = ap_sub_req_lookup_uri(Z_STRVAL_PP(p1), ctx->f->r);
|
|
if (rr->status == HTTP_OK) {
|
|
ap_run_sub_req(rr);
|
|
RETURN_TRUE;
|
|
}
|
|
RETURN_FALSE;
|
|
}
|
|
|