httpd-cvs mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s.@apache.org
Subject svn commit: r1147614 - in /httpd/httpd/trunk: CHANGES modules/arch/netware/mod_nw_ssl.c modules/mappers/mod_rewrite.c modules/ssl/ssl_engine_vars.c server/util_expr_eval.c server/util_script.c
Date Sun, 17 Jul 2011 13:56:30 GMT
Author: sf
Date: Sun Jul 17 13:56:28 2011
New Revision: 1147614

URL: http://svn.apache.org/viewvc?rev=1147614&view=rev
Log:
Make the SERVER_NAME variable include [ ] for literal IPv6 addresses, as
mandated by RFC 3875

PR: 26005

Modified:
    httpd/httpd/trunk/CHANGES
    httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
    httpd/httpd/trunk/modules/mappers/mod_rewrite.c
    httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
    httpd/httpd/trunk/server/util_expr_eval.c
    httpd/httpd/trunk/server/util_script.c

Modified: httpd/httpd/trunk/CHANGES
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/CHANGES?rev=1147614&r1=1147613&r2=1147614&view=diff
==============================================================================
--- httpd/httpd/trunk/CHANGES [utf-8] (original)
+++ httpd/httpd/trunk/CHANGES [utf-8] Sun Jul 17 13:56:28 2011
@@ -2,6 +2,10 @@
 
 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>]
 

Modified: httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c?rev=1147614&r1=1147613&r2=1147614&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c (original)
+++ httpd/httpd/trunk/modules/arch/netware/mod_nw_ssl.c Sun Jul 17 13:56:28 2011
@@ -1016,7 +1016,7 @@ char *ssl_var_lookup(apr_pool_t *p, serv
             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"))

Modified: httpd/httpd/trunk/modules/mappers/mod_rewrite.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/mappers/mod_rewrite.c?rev=1147614&r1=1147613&r2=1147614&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/mappers/mod_rewrite.c (original)
+++ httpd/httpd/trunk/modules/mappers/mod_rewrite.c Sun Jul 17 13:56:28 2011
@@ -1963,7 +1963,7 @@ static char *lookup_variable(char *var, 
             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;
 

Modified: httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c?rev=1147614&r1=1147613&r2=1147614&view=diff
==============================================================================
--- httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c (original)
+++ httpd/httpd/trunk/modules/ssl/ssl_engine_vars.c Sun Jul 17 13:56:28 2011
@@ -203,7 +203,7 @@ char *ssl_var_lookup(apr_pool_t *p, serv
             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"))

Modified: httpd/httpd/trunk/server/util_expr_eval.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_expr_eval.c?rev=1147614&r1=1147613&r2=1147614&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_expr_eval.c (original)
+++ httpd/httpd/trunk/server/util_expr_eval.c Sun Jul 17 13:56:28 2011
@@ -1193,7 +1193,7 @@ static const char *request_var_fn(ap_exp
     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:

Modified: httpd/httpd/trunk/server/util_script.c
URL: http://svn.apache.org/viewvc/httpd/httpd/trunk/server/util_script.c?rev=1147614&r1=1147613&r2=1147614&view=diff
==============================================================================
--- httpd/httpd/trunk/server/util_script.c (original)
+++ httpd/httpd/trunk/server/util_script.c Sun Jul 17 13:56:28 2011
@@ -229,7 +229,7 @@ AP_DECLARE(void) ap_add_common_vars(requ
     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)));



Mime
View raw message