summaryrefslogtreecommitdiff
path: root/sapi/apache2handler/sapi_apache2.c
diff options
context:
space:
mode:
authorIlia Alshanetsky <iliaa@php.net>2006-11-09 00:13:26 +0000
committerIlia Alshanetsky <iliaa@php.net>2006-11-09 00:13:26 +0000
commite5f9b479af6ab24f8989e39f21d0e39193a6f3ad (patch)
treede5901062252de70ab18818d7a673ae5ab4b0376 /sapi/apache2handler/sapi_apache2.c
parent1f061b3154107d83ea06b9a165994589743ab0c8 (diff)
downloadphp-git-e5f9b479af6ab24f8989e39f21d0e39193a6f3ad.tar.gz
Fixed bug #38602 (header( "HTTP/1.0 ..." ) does not change proto version).
Diffstat (limited to 'sapi/apache2handler/sapi_apache2.c')
-rw-r--r--sapi/apache2handler/sapi_apache2.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/sapi/apache2handler/sapi_apache2.c b/sapi/apache2handler/sapi_apache2.c
index e7789cf863..4cb12cb86f 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,