From: Ilia Alshanetsky Date: Fri, 23 May 2003 02:42:22 +0000 (+0000) Subject: MFH X-Git-Tag: php-4.3.2RC4~25 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=31fe8c5c1637b72962461514bfcf8a34cfa92266;p=php MFH --- 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;