Mantis - Resin
Viewing Issue Advanced Details
5399 minor always 03-18-13 13:16 05-21-13 11:09
alex  
ferg  
normal  
closed 4.0.35  
fixed  
none    
none 4.0.37  
0005399: IPv6: request.getServerName()
rep by shiny caucho forums.


<%=request.getServerName()%>

and visited

http://[::1] [^]

The result on browser was:

Resin ServerName: [:

Where was the last '1'?

By searching in the src of Resin, I found the following lines in AbstractHttpRequest.java

....
int p1 = host.lastIndexOf('/');
if (p1 < 0)
p1 = 0;

int p = host.lastIndexOf(':');
if (p >= 0 && p1 < p)
return host.substring(p1, p);
else
return host;
....


Notes
(0006259)
ferg   
05-21-13 11:09   
server/1m14