Skip to content

Commit c3fe112

Browse files
committed
Consistent use of getLocalAddr() without DNS lookups in request adapters
Closes gh-28280
1 parent 90103b0 commit c3fe112

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-web/src/main/java/org/springframework/http/server/ServletServerHttpRequest.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ public Principal getPrincipal() {
197197

198198
@Override
199199
public InetSocketAddress getLocalAddress() {
200-
return new InetSocketAddress(this.servletRequest.getLocalName(), this.servletRequest.getLocalPort());
200+
return new InetSocketAddress(this.servletRequest.getLocalAddr(), this.servletRequest.getLocalPort());
201201
}
202202

203203
@Override

0 commit comments

Comments
 (0)