summaryrefslogtreecommitdiff
path: root/sapi
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-05-23 02:41:59 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-05-23 02:41:59 +0000
commit2f15b2062ce9405840cdfe13677c0958cc3c6c53 (patch)
treec0e5529279b6df06e5f42cf5100295c7eb144c84 /sapi
parent9b08c569c66a07529101d92610ba41de28424395 (diff)
downloadphp-git-2f15b2062ce9405840cdfe13677c0958cc3c6c53.tar.gz
Fixed bug #23759 (PHP doesn't preserve subrequest status).
(jaboydjr.netwalk@com, Ilia)
Diffstat (limited to 'sapi')
-rw-r--r--sapi/apache2filter/sapi_apache2.c2
-rw-r--r--sapi/apache2handler/sapi_apache2.c2
2 files changed, 2 insertions, 2 deletions
diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c
index f1f0e9365d..1fdbd76200 100644
--- a/sapi/apache2filter/sapi_apache2.c
+++ b/sapi/apache2filter/sapi_apache2.c
@@ -376,7 +376,7 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC)
const char *auth;
PG(during_request_startup) = 0;
- SG(sapi_headers).http_response_code = 200;
+ SG(sapi_headers).http_response_code = !f->r->status ? HTTP_OK : f->r->status;
SG(request_info).content_type = apr_table_get(f->r->headers_in, "Content-Type");
#undef safe_strdup
#define safe_strdup(x) ((x)?strdup((x)):NULL)
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index 0abd1e20b3..f869fbed7a 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -407,7 +407,7 @@ static void php_apache_request_ctor(request_rec *r, php_struct *ctx TSRMLS_DC)
char *content_type;
const char *auth;
- SG(sapi_headers).http_response_code = 200;
+ SG(sapi_headers).http_response_code = !r->status ? HTTP_OK : r->status;
SG(request_info).content_type = apr_table_get(r->headers_in, "Content-Type");
SG(request_info).query_string = apr_pstrdup(r->pool, r->args);
SG(request_info).request_method = r->method;