summaryrefslogtreecommitdiff
path: root/sapi/apache/mod_php5.c
diff options
context:
space:
mode:
authorRasmus Lerdorf <rasmus@php.net>2005-03-14 19:25:39 +0000
committerRasmus Lerdorf <rasmus@php.net>2005-03-14 19:25:39 +0000
commit3c0411c496e1b70dd09b094301a4f4a39d8fecab (patch)
treec582f89d9b2d5b12577127ff737da4d37f85829f /sapi/apache/mod_php5.c
parent1dbc47c43f3bf34cc642a4b79bac9e60d20128bd (diff)
downloadphp-git-3c0411c496e1b70dd09b094301a4f4a39d8fecab.tar.gz
Fix for bug #32263
This adds proto_num to request_info. It is defaulted to HTTP 1.0 (1000) such that it has a valid value even if the underlying sapi doesn't set it correctly. It is then used to determine if a 302 or a 303 should be sent on a Location redirect. Any non GET/HEAD HTTP 1.1 redirect will get a 303 instead of a 302 to be compatible with the HTTP spec.
Diffstat (limited to 'sapi/apache/mod_php5.c')
-rw-r--r--sapi/apache/mod_php5.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/sapi/apache/mod_php5.c b/sapi/apache/mod_php5.c
index ad2f3b3520..59be19df4b 100644
--- a/sapi/apache/mod_php5.c
+++ b/sapi/apache/mod_php5.c
@@ -484,6 +484,7 @@ static void init_request_info(TSRMLS_D)
SG(request_info).content_type = (char *) table_get(r->subprocess_env, "CONTENT_TYPE");
SG(request_info).content_length = (content_length ? atoi(content_length) : 0);
SG(sapi_headers).http_response_code = r->status;
+ SG(request_info).proto_num = r->proto_num;
if (r->headers_in) {
authorization = table_get(r->headers_in, "Authorization");