This is an automated email from the ASF dual-hosted git repository.
markt pushed a commit to branch 9.0.x
in repository https://gitbox.apache.org/repos/asf/tomcat.git
The following commit(s) were added to refs/heads/9.0.x by this push:
new 994d3a7 Act on rather old TODO comment
994d3a7 is described below
commit 994d3a70772da49ca0f10458e7494e008f3e354e
Author: Mark Thomas <[email protected]>
AuthorDate: Tue Jun 15 20:54:46 2021 +0100
Act on rather old TODO comment
---
java/org/apache/catalina/valves/RemoteIpValve.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/java/org/apache/catalina/valves/RemoteIpValve.java
b/java/org/apache/catalina/valves/RemoteIpValve.java
index 7655888..8f85900 100644
--- a/java/org/apache/catalina/valves/RemoteIpValve.java
+++ b/java/org/apache/catalina/valves/RemoteIpValve.java
@@ -19,6 +19,7 @@ package org.apache.catalina.valves;
import java.io.IOException;
import java.net.InetAddress;
import java.net.UnknownHostException;
+import java.util.Deque;
import java.util.Enumeration;
import java.util.Iterator;
import java.util.LinkedList;
@@ -625,8 +626,7 @@ public class RemoteIpValve extends ValveBase {
if (isInternal || (trustedProxies != null &&
trustedProxies.matcher(originalRemoteAddr).matches())) {
String remoteIp = null;
- // In java 6, proxiesHeaderValue should be declared as a
java.util.Deque
- LinkedList<String> proxiesHeaderValue = new LinkedList<>();
+ Deque<String> proxiesHeaderValue = new LinkedList<>();
StringBuilder concatRemoteIpHeaderValue = new StringBuilder();
for (Enumeration<String> e = request.getHeaders(remoteIpHeader);
e.hasMoreElements();) {
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]