This is an automated email from the ASF dual-hosted git repository.

elecharny pushed a commit to branch 2.1.X
in repository https://gitbox.apache.org/repos/asf/mina.git


The following commit(s) were added to refs/heads/2.1.X by this push:
     new 4f8966a  Use equals rather than == to compare Strings
     new 619829b  Merge pull request #22 from coheigea/string_comp
4f8966a is described below

commit 4f8966a55250b43c7fb8c2ec0592d99ead5d63b2
Author: Colm O hEigeartaigh <[email protected]>
AuthorDate: Tue Jun 18 10:11:07 2019 +0100

    Use equals rather than == to compare Strings
---
 .../java/org/apache/mina/proxy/handlers/http/HttpProxyRequest.java    | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git 
a/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/HttpProxyRequest.java
 
b/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/HttpProxyRequest.java
index d61818f..3ff621b 100644
--- 
a/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/HttpProxyRequest.java
+++ 
b/mina-core/src/main/java/org/apache/mina/proxy/handlers/http/HttpProxyRequest.java
@@ -290,7 +290,7 @@ public class HttpProxyRequest extends ProxyRequest {
                 }
             }
 
-            if (!hostHeaderFound && getHttpVersion() == 
HttpProxyConstants.HTTP_1_1) {
+            if (!hostHeaderFound && 
HttpProxyConstants.HTTP_1_1.equals(getHttpVersion())) {
                 sb.append("Host: 
").append(getHost()).append(HttpProxyConstants.CRLF);
             }
         }
@@ -299,4 +299,4 @@ public class HttpProxyRequest extends ProxyRequest {
 
         return sb.toString();
     }
-}
\ No newline at end of file
+}

Reply via email to