This is an automated email from the ASF dual-hosted git repository.
lhotari pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/pulsar.git
The following commit(s) were added to refs/heads/master by this push:
new 14991c93533 Skip unnecessary DNS resolution when creating
AuthenticationDataHttp instance (#15221)
14991c93533 is described below
commit 14991c93533927c35dd3cba74fe52ba3d57f244b
Author: Lari Hotari <[email protected]>
AuthorDate: Wed Apr 20 06:08:36 2022 +0300
Skip unnecessary DNS resolution when creating AuthenticationDataHttp
instance (#15221)
---
.../apache/pulsar/broker/authentication/AuthenticationDataHttp.java | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
index 9d8ab42b467..75a75225576 100644
---
a/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
+++
b/pulsar-broker-common/src/main/java/org/apache/pulsar/broker/authentication/AuthenticationDataHttp.java
@@ -18,6 +18,7 @@
*/
package org.apache.pulsar.broker.authentication;
+import io.netty.util.NetUtil;
import java.net.InetSocketAddress;
import java.net.SocketAddress;
import javax.servlet.http.HttpServletRequest;
@@ -34,7 +35,9 @@ public class AuthenticationDataHttp implements
AuthenticationDataSource {
throw new IllegalArgumentException();
}
this.request = request;
- this.remoteAddress = new InetSocketAddress(request.getRemoteAddr(),
request.getRemotePort());
+ this.remoteAddress =
+ new
InetSocketAddress(NetUtil.createInetAddressFromIpAddressString(request.getRemoteAddr()),
+ request.getRemotePort());
}
/*