Author: remy.maucherat(a)jboss.com
Date: 2012-10-16 12:06:15 -0400 (Tue, 16 Oct 2012)
New Revision: 2109
Modified:
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
branches/7.2.x/webapps/docs/changelog.xml
Log:
JBWEB-250: Fix remote address cut & paste issue.
Modified: branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java
===================================================================
---
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-10-10
17:55:01 UTC (rev 2108)
+++
branches/7.2.x/src/main/java/org/apache/coyote/http11/Http11NioProcessor.java 2012-10-16
16:06:15 UTC (rev 2109)
@@ -547,7 +547,8 @@
private void requestHostAddressAttr() {
if (remoteAddr == null && (channel != null)) {
try {
- remoteAddr = ((InetSocketAddress) this.channel.getRemoteAddress()).getHostName();
+ remoteAddr = ((InetSocketAddress) this.channel.getRemoteAddress()).getAddress()
+ .getHostAddress();
} catch (Exception e) {
CoyoteLogger.HTTP_LOGGER.errorGettingSocketInformation(e);
}
Modified: branches/7.2.x/webapps/docs/changelog.xml
===================================================================
--- branches/7.2.x/webapps/docs/changelog.xml 2012-10-10 17:55:01 UTC (rev 2108)
+++ branches/7.2.x/webapps/docs/changelog.xml 2012-10-16 16:06:15 UTC (rev 2109)
@@ -25,6 +25,13 @@
</fix>
</changelog>
</subsection>
+ <subsection name="Coyote">
+ <changelog>
+ <fix>
+ <jira>250</jira>: Fix remote address, submitted by Cheng Fang.
(remm)
+ </fix>
+ </changelog>
+ </subsection>
</section>
<section name="JBoss Web 7.2.0.Alpha2 (remm)">
Show replies by date