From: Ilia Alshanetsky Date: Thu, 9 Nov 2006 00:13:39 +0000 (+0000) Subject: MFB: Fixed bug #38602 (header( "HTTP/1.0 ..." ) does not change proto X-Git-Tag: RELEASE_1_0_0RC1~1100 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e34c7f161c00bc3898ad835bb49067cba8c9a5a4;p=php MFB: Fixed bug #38602 (header( "HTTP/1.0 ..." ) does not change proto version). --- diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c index f888e67b1b..3f548f288a 100644 --- a/sapi/apache2handler/sapi_apache2.c +++ b/sapi/apache2handler/sapi_apache2.c @@ -129,9 +129,14 @@ php_apache_sapi_send_headers(sapi_headers_struct *sapi_headers TSRMLS_DC) /* httpd requires that r->status_line is set to the first digit of * the status-code: */ - if (sline && strlen(sline) > 12 && strncmp(sline, "HTTP/1.", 7) == 0 - && sline[8] == ' ') { + if (sline && strlen(sline) > 12 && strncmp(sline, "HTTP/1.", 7) == 0 && sline[8] == ' ') { ctx->r->status_line = apr_pstrdup(ctx->r->pool, sline + 9); + ctx->r->proto_num = 1000 + (sline[7]-'0'); + if ((sline[7]-'0') == 0) { + apr_table_set(ctx->r->subprocess_env, "force-response-1.0", "true"); + } else { + apr_table_set(ctx->r->subprocess_env, "force-response-1.1", "true"); + } } /* call ap_set_content_type only once, else each time we call it,