]> granicus.if.org Git - php/commitdiff
MFH
authorIlia Alshanetsky <iliaa@php.net>
Fri, 23 May 2003 02:42:22 +0000 (02:42 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 23 May 2003 02:42:22 +0000 (02:42 +0000)
sapi/apache2filter/sapi_apache2.c
sapi/apache2handler/sapi_apache2.c

index ccf3bea4c9779d84e18aa1f338f119c7f946a159..5e603edee93529742c0046ea20d7cba2103d4489 100644 (file)
@@ -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)  
index 7c9af93d8b08acc81ac9e1f4fbfd89c134572dbc..91399b351fe819df2e07540589aa8f60066564e3 100644 (file)
@@ -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;