Changes with Apache 2.3.11
+ *) core, mod_rewrite: Make the REQUEST_SCHEME variable available to
+ scripts and mod_rewrite. [Stefan Fritsch]
+
*) mod_rewrite: Allow to use arbitrary boolean expressions (ap_expr) in
RewriteCond. [Stefan Fritsch]
REQUEST_FILENAME<br />
IS_SUBREQ<br />
HTTPS<br />
+ REQUEST_SCHEME<br />
</td>
</tr>
</table>
can be safely used regardless of whether or not
<code class="module"><a href="../mod/mod_ssl.html">mod_ssl</a></code> is loaded).</dd>
+ <dt><code>REQUEST_SCHEME</code></dt>
+
+ <dd>Will contain the scheme of the request (ususally
+ "http" or "https"). This value can be influenced with
+ <code class="directive"><a href="../mod/core.html#servername">ServerName</a></code>.</dd>
+
</dl>
</div>
</li>
REQUEST_FILENAME<br />
IS_SUBREQ<br />
HTTPS<br />
+ REQUEST_SCHEME<br />
</td>
</tr>
</table>
can be safely used regardless of whether or not
<module>mod_ssl</module> is loaded).</dd>
+ <dt><code>REQUEST_SCHEME</code></dt>
+
+ <dd>Will contain the scheme of the request (ususally
+ "http" or "https"). This value can be influenced with
+ <directive module="core">ServerName</directive>.</dd>
+
</dl>
</note>
</li>
if (*var == 'H' && !strcmp(var, "HTTP_FORWARDED")) {
result = lookup_header("Forwarded", ctx);
}
- else if (!strcmp(var, "REQUEST_METHOD")) {
+ else if (var[8] == 'M' && !strcmp(var, "REQUEST_METHOD")) {
result = r->method;
}
+ else if (!strcmp(var, "REQUEST_SCHEME")) {
+ result = ap_http_scheme(r);
+ }
break;
case 15:
apr_table_setn(e, "GATEWAY_INTERFACE", "CGI/1.1");
apr_table_setn(e, "SERVER_PROTOCOL", r->protocol);
apr_table_setn(e, "REQUEST_METHOD", r->method);
+ apr_table_setn(e, "REQUEST_SCHEME", ap_http_scheme(r));
apr_table_setn(e, "QUERY_STRING", r->args ? r->args : "");
apr_table_setn(e, "REQUEST_URI", original_uri(r));