Hi,

mod_rewrite incorrectly omits the brackets around literal IPv6 
addresses in redirects. Similar issues have been fixed at other places 
in the code already. In server/core.c there is 
get_server_name_for_url(), a wrapper around ap_get_server_name, which 
adds the brackets.

I think making ap_get_server_name do the right thing would be better 
than introducing the same fix at many different places. I have found 
the following uses of ap_get_server_name:

mod_cache:
the cache key includes host:port and should probably have the brackets

mod_vhost_alias:
directory name (doesn't really matter, but change would be backward 
incompatible)

server/core.c:
server signature (doesn't matter)

mod_proxy_http:
via header (should have brackets)

ssl_engine_kernel.c:
error message url (should have brackets)

mod_rewrite:
redirects (should have brackets)
logging (doesn't matter)
SERVER_NAME variable

It's also used for the SERVER_NAME variable in:
ssl_engine_vars.c    
server/util_script.c
server/util_expr.c

I guess many scripts don't have a special case for IPv6 literals. I 
think having the brackets in the SERVER_NAME variable would be better. 
Is there some spec how this should be?


modules/proxy/ajp_header.c

sent as server_name to the backend. The AJP protocol specification 
doesn't say anything about this. Any idea?


mod_auth_digest.c

No idea. Can somebody with knowledge of digest auth check this?


What do you think about changing ap_get_server_name() in trunk?

Cheers,
Stefan

Reply via email to