-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) ap_expr: Add SERVER_PROTOCOL_VERSION, ..._MAJOR, and ..._MINOR
+ variables. [Stefan Fritsch]
+
*) mod_rewrite: Stop mergeing RewriteBase down to subdirectories
unless new option 'RewriteOptions MergeBase' is configured.
PR 53963. [Eric Covener]
<td>The <directive module="core">ServerAdmin</directive> of
the current vhost</td></tr>
<tr><td><code>SERVER_PROTOCOL</code></td>
- <td>The protocol used by the request</td></tr>
+ <td>The protocol used by the request (e.g. HTTP/1.1). In some types of
+ internal subrequests, this variable has the value
+ <code>INCLUDED</code>.</td></tr>
+ <tr><td><code>SERVER_PROTOCOL_VERSION</code></td>
+ <td>A number that encodes the HTTP version of the request:
+ <code>1000 * major + minor</code>. For example, <code>1001</code>
+ corresponds to HTTP/1.1 and <code>9</code> corresponds
+ to HTTP/0.9</td></tr>
+ <tr><td><code>SERVER_PROTOCOL_VERSION_MAJOR</code></td>
+ <td>A major version part of the HTTP version of the request,
+ e.g. <code>1</code> for HTTP/1.0</td></tr>
+ <tr><td><code>SERVER_PROTOCOL_VERSION_MINOR</code></td>
+ <td>A minor version part of the HTTP version of the request,
+ e.g. <code>0</code> for HTTP/1.0</td></tr>
<tr><td><code>DOCUMENT_ROOT</code></td>
<td>The <directive module="core">DocumentRoot</directive> of
the current vhost</td></tr>
"CONTEXT_DOCUMENT_ROOT", /* 26 */
"REQUEST_STATUS", /* 27 */
"REMOTE_ADDR", /* 28 */
+ "SERVER_PROTOCOL_VERSION", /* 29 */
+ "SERVER_PROTOCOL_VERSION_MAJOR", /* 30 */
+ "SERVER_PROTOCOL_VERSION_MINOR", /* 31 */
NULL
};
return r->status ? apr_psprintf(ctx->p, "%d", r->status) : "";
case 28:
return r->useragent_ip;
+ case 29:
+ switch (r->proto_num) {
+ case 1001: return "1001"; /* 1.1 */
+ case 1000: return "1000"; /* 1.0 */
+ case 9: return "9"; /* 0.9 */
+ }
+ return apr_psprintf(ctx->p, "%d", r->proto_num);
+ case 30:
+ switch (HTTP_VERSION_MAJOR(r->proto_num)) {
+ case 0: return "0";
+ case 1: return "1";
+ }
+ return apr_psprintf(ctx->p, "%d", HTTP_VERSION_MAJOR(r->proto_num));
+ case 31:
+ switch (HTTP_VERSION_MINOR(r->proto_num)) {
+ case 0: return "0";
+ case 1: return "1";
+ case 9: return "9";
+ }
+ return apr_psprintf(ctx->p, "%d", HTTP_VERSION_MINOR(r->proto_num));
default:
ap_assert(0);
return NULL;