jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1411492 - /jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
Date Tue, 20 Nov 2012 01:00:12 GMT
Author: sebb
Date: Tue Nov 20 01:00:12 2012
New Revision: 1411492

URL: http://svn.apache.org/viewvc?rev=1411492&view=rev
Log:
Use HTTPConstants for port numbers

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java?rev=1411492&r1=1411491&r2=1411492&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/control/AuthManager.java
Tue Nov 20 01:00:12 2012
@@ -155,11 +155,11 @@ public class AuthManager extends ConfigT
         try {
             if (url.getPort() == -1) {
                 // Obtain another URL with an explicit port:
-                int port = url.getProtocol().equalsIgnoreCase("http") ? 80 : 443;
+                int port = url.getProtocol().equalsIgnoreCase("http") ? HTTPConstants.DEFAULT_HTTP_PORT
: HTTPConstants.DEFAULT_HTTPS_PORT;
                 // only http and https are supported
                 url2 = new URL(url.getProtocol(), url.getHost(), port, url.getPath());
-            } else if ((url.getPort() == 80 && url.getProtocol().equalsIgnoreCase("http"))
-                    || (url.getPort() == 443 && url.getProtocol().equalsIgnoreCase("https")))
{
+            } else if ((url.getPort() == HTTPConstants.DEFAULT_HTTP_PORT && url.getProtocol().equalsIgnoreCase("http"))
+                    || (url.getPort() == HTTPConstants.DEFAULT_HTTPS_PORT && url.getProtocol().equalsIgnoreCase("https")))
{
                 url2 = new URL(url.getProtocol(), url.getHost(), url.getPath());
             }
         } catch (MalformedURLException e) {



Mime
View raw message