From 3c0411c496e1b70dd09b094301a4f4a39d8fecab Mon Sep 17 00:00:00 2001 From: Rasmus Lerdorf Date: Mon, 14 Mar 2005 19:25:39 +0000 Subject: 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. --- sapi/apache2filter/sapi_apache2.c | 1 + 1 file changed, 1 insertion(+) (limited to 'sapi/apache2filter') diff --git a/sapi/apache2filter/sapi_apache2.c b/sapi/apache2filter/sapi_apache2.c index 11713ef75c..359c3442c8 100644 --- a/sapi/apache2filter/sapi_apache2.c +++ b/sapi/apache2filter/sapi_apache2.c @@ -397,6 +397,7 @@ static void php_apache_request_ctor(ap_filter_t *f, php_struct *ctx TSRMLS_DC) #define safe_strdup(x) ((x)?strdup((x)):NULL) SG(request_info).query_string = safe_strdup(f->r->args); SG(request_info).request_method = f->r->method; + SG(request_info).proto_num = f->r->proto_num; SG(request_info).request_uri = safe_strdup(f->r->uri); SG(request_info).path_translated = safe_strdup(f->r->filename); f->r->no_local_copy = 1; -- cgit v1.2.1