summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2003-05-23 02:42:22 +0000
committerIlia Alshanetsky <iliaa@php.net>2003-05-23 02:42:22 +0000
commit31fe8c5c1637b72962461514bfcf8a34cfa92266 (patch)
tree61367f0e0904d85755f1a6f83846dbb4ad73465c
parent1c0ff3c97e27d4b0ab5323a048e2e11bf5554a25 (diff)
downloadphp-git-31fe8c5c1637b72962461514bfcf8a34cfa92266.tar.gz
MFH
-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 ccf3bea4c9..5e603edee9 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 7c9af93d8b..91399b351f 100644
--- a/sapi/apache2handler/sapi_apache2.c
+++ b/sapi/apache2handler/sapi_apache2.c
@@ -412,7 +412,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;