]> granicus.if.org Git - php/commitdiff
Fixed bug #23759 (PHP doesn't preserve subrequest status).
authorIlia Alshanetsky <iliaa@php.net>
Fri, 23 May 2003 02:41:59 +0000 (02:41 +0000)
committerIlia Alshanetsky <iliaa@php.net>
Fri, 23 May 2003 02:41:59 +0000 (02:41 +0000)
(jaboydjr.netwalk@com, Ilia)

sapi/apache2filter/sapi_apache2.c
sapi/apache2handler/sapi_apache2.c

index f1f0e9365dbbf19d90f71460d3e0f450caf6115d..1fdbd7620000f1412403aac06abaf718a8046f36 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 0abd1e20b3198d5f381696ff67308575be16d970..f869fbed7a10cfda1bf5c515c911121d08fb17a6 100644 (file)
@@ -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;