Changes with Apache 2.3.14
+ *) core, mod_rewrite, mod_ssl, mod_nw_ssl: Make the SERVER_NAME variable
+ include [ ] for literal IPv6 addresses, as mandated by RFC 3875.
+ PR 26005. [Stefan Fritsch]
+
*) mod_negotiation: Fix parsing of Content-Length in type maps. PR 42203.
[Nagae Hidetake <nagae eagan jp>]
if (strcEQ(var, "SERVER_ADMIN"))
result = r->server->server_admin;
else if (strcEQ(var, "SERVER_NAME"))
- result = ap_get_server_name(r);
+ result = ap_get_server_name_for_url(r);
else if (strcEQ(var, "SERVER_PORT"))
result = apr_psprintf(p, "%u", ap_get_server_port(r));
else if (strcEQ(var, "SERVER_PROTOCOL"))
switch (var[8]) {
case 'A':
if (!strcmp(var, "SERVER_NAME")) {
- result = ap_get_server_name(r);
+ result = ap_get_server_name_for_url(r);
}
break;
if (strcEQ(var, "SERVER_ADMIN"))
result = r->server->server_admin;
else if (strcEQ(var, "SERVER_NAME"))
- result = ap_get_server_name(r);
+ result = ap_get_server_name_for_url(r);
else if (strcEQ(var, "SERVER_PORT"))
result = apr_psprintf(p, "%u", ap_get_server_port(r));
else if (strcEQ(var, "SERVER_PROTOCOL"))
case 7:
return r->server->server_admin;
case 8:
- return ap_get_server_name(r);
+ return ap_get_server_name_for_url(r);
case 9:
return apr_psprintf(ctx->p, "%u", ap_get_server_port(r));
case 10:
apr_table_addn(e, "SERVER_SIGNATURE", ap_psignature("", r));
apr_table_addn(e, "SERVER_SOFTWARE", ap_get_server_banner());
apr_table_addn(e, "SERVER_NAME",
- ap_escape_html(r->pool, ap_get_server_name(r)));
+ ap_escape_html(r->pool, ap_get_server_name_for_url(r)));
apr_table_addn(e, "SERVER_ADDR", r->connection->local_ip); /* Apache */
apr_table_addn(e, "SERVER_PORT",
apr_psprintf(r->pool, "%u", ap_get_server_port(r)));