felix-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pa...@apache.org
Subject svn commit: r1800876 - /felix/trunk/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterRequestTest.java
Date Wed, 05 Jul 2017 13:55:41 GMT
Author: pauls
Date: Wed Jul  5 13:55:41 2017
New Revision: 1800876

URL: http://svn.apache.org/viewvc?rev=1800876&view=rev
Log:
FELIX-5662: Return 443 as the default port for a request in case we don't have a (parsable)
X-Forwarded-Port - Fix tests.

Modified:
    felix/trunk/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterRequestTest.java

Modified: felix/trunk/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterRequestTest.java
URL: http://svn.apache.org/viewvc/felix/trunk/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterRequestTest.java?rev=1800876&r1=1800875&r2=1800876&view=diff
==============================================================================
--- felix/trunk/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterRequestTest.java
(original)
+++ felix/trunk/http/sslfilter/src/test/java/org/apache/felix/http/sslfilter/internal/SslFilterRequestTest.java
Wed Jul  5 13:55:41 2017
@@ -91,19 +91,19 @@ public class SslFilterRequestTest
         
         when(req.getHeader(HDR_X_FORWARDED_PORT)).thenReturn(null);        
         when(req.getServerPort()).thenReturn(-1);
-        assertEquals(-1, sreq.getServerPort());
+        assertEquals(443, sreq.getServerPort());
         
         when(req.getHeader(HDR_X_FORWARDED_PORT)).thenReturn("");        
         when(req.getServerPort()).thenReturn(-1);
-        assertEquals(-1, sreq.getServerPort());
+        assertEquals(443, sreq.getServerPort());
         
         when(req.getHeader(HDR_X_FORWARDED_PORT)).thenReturn("WRONG");        
         when(req.getServerPort()).thenReturn(-1);
-        assertEquals(-1, sreq.getServerPort());
+        assertEquals(443, sreq.getServerPort());
         
         when(req.getHeader(HDR_X_FORWARDED_PORT)).thenReturn("W1");        
         when(req.getServerPort()).thenReturn(-1);
-        assertEquals(-1, sreq.getServerPort());
+        assertEquals(443, sreq.getServerPort());
         
         when(req.getHeader(HDR_X_FORWARDED_PORT)).thenReturn("443");        
         assertEquals(443, sreq.getServerPort());



Mime
View raw message