diff options
| author | Rasmus Lerdorf <rasmus@php.net> | 2005-03-14 19:25:39 +0000 |
|---|---|---|
| committer | Rasmus Lerdorf <rasmus@php.net> | 2005-03-14 19:25:39 +0000 |
| commit | 3c0411c496e1b70dd09b094301a4f4a39d8fecab (patch) | |
| tree | c582f89d9b2d5b12577127ff737da4d37f85829f /sapi/aolserver | |
| parent | 1dbc47c43f3bf34cc642a4b79bac9e60d20128bd (diff) | |
| download | php-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/aolserver')
| -rw-r--r-- | sapi/aolserver/aolserver.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/sapi/aolserver/aolserver.c b/sapi/aolserver/aolserver.c index 7109e11a51..1aa460358b 100644 --- a/sapi/aolserver/aolserver.c +++ b/sapi/aolserver/aolserver.c @@ -444,6 +444,8 @@ php_ns_request_ctor(TSRMLS_D) root = Ns_PageRoot(server); SG(request_info).request_uri = strdup(SG(request_info).path_translated + strlen(root)); SG(request_info).request_method = NSG(conn)->request->method; + if(NSG(conn)->request->version > 1.0) SG(request_info).proto_num = 1001; + else SG(request_info).proto_num = 1000; SG(request_info).content_length = Ns_ConnContentLength(NSG(conn)); index = Ns_SetIFind(NSG(conn)->headers, "content-type"); SG(request_info).content_type = index == -1 ? NULL : |
