-*- coding: utf-8 -*-
Changes with Apache 2.5.0
+ *) ap_expr: expression support for variable HTTP2=on|off
+ [Stefan Eissing]
+
*) mod_status/scoreboard: showing connection protocol in new column, new
ap_update_child_status methods for updating server/description. mod_ssl
sets vhost negotiated by servername directly.
<tr><td><code>HANDLER</code></td>
<td>The name of the <a href="handler.html">handler</a> creating
the response</td></tr>
+ <tr><td><code>HTTP2</code></td>
+ <td>"<code>on</code>" if the request uses http/2,
+ "<code>off</code>" otherwise</td></tr>
<tr><td><code>HTTPS</code></td>
<td>"<code>on</code>" if the request uses https,
"<code>off</code>" otherwise</td></tr>
APLOGNO(02949) "initializing connection handling");
}
- APR_REGISTER_OPTIONAL_FN(http2_is_h2);
- APR_REGISTER_OPTIONAL_FN(http2_var_lookup);
}
/* Install this module into the apache2 infrastructure.
{
static const char *const mod_ssl[] = { "mod_ssl.c", NULL};
+ APR_REGISTER_OPTIONAL_FN(http2_is_h2);
+ APR_REGISTER_OPTIONAL_FN(http2_var_lookup);
+
ap_log_perror(APLOG_MARK, APLOG_TRACE1, 0, pool, "installing hooks");
/* Run once after configuration is set, but before mpm children initialize.
APR_DECLARE_OPTIONAL_FN(int, ssl_is_https, (conn_rec *));
static APR_OPTIONAL_FN_TYPE(ssl_is_https) *is_https = NULL;
+APR_DECLARE_OPTIONAL_FN(int, http2_is_h2, (conn_rec *));
+static APR_OPTIONAL_FN_TYPE(http2_is_h2) *is_http2 = NULL;
+
static const char *conn_var_names[] = {
"HTTPS", /* 0 */
"IPV6", /* 1 */
"CONN_LOG_ID", /* 2 */
"CONN_REMOTE_ADDR", /* 3 */
+ "HTTP2", /* 4 */
NULL
};
return c->log_id;
case 3:
return c->client_ip;
+ case 4:
+ if (is_http2 && is_http2(c))
+ return "on";
+ else
+ return "off";
default:
ap_assert(0);
return NULL;
apr_pool_t *ptemp, server_rec *s)
{
is_https = APR_RETRIEVE_OPTIONAL_FN(ssl_is_https);
+ is_http2 = APR_RETRIEVE_OPTIONAL_FN(http2_is_h2);
apr_pool_cleanup_register(pconf, &is_https, ap_pool_cleanup_set_null,
apr_pool_cleanup_null);
return OK;