jmeter-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From s...@apache.org
Subject svn commit: r1511691 - in /jmeter/trunk: src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java xdocs/changes.xml
Date Thu, 08 Aug 2013 11:04:59 GMT
Author: sebb
Date: Thu Aug  8 11:04:58 2013
New Revision: 1511691

URL: http://svn.apache.org/r1511691
Log:
HC3 does not allow IP Source field to override httpclient.localaddress
Bugzilla Id: 55388

Modified:
    jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
    jmeter/trunk/xdocs/changes.xml

Modified: jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
URL: http://svn.apache.org/viewvc/jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java?rev=1511691&r1=1511690&r2=1511691&view=diff
==============================================================================
--- jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
(original)
+++ jmeter/trunk/src/protocol/http/org/apache/jmeter/protocol/http/sampler/HTTPHC3Impl.java
Thu Aug  8 11:04:58 2013
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.io.InputStream;
 import java.io.OutputStream;
 import java.net.InetAddress;
-import java.net.URISyntaxException;
 import java.net.URL;
 import java.net.URLDecoder;
 import java.util.ArrayList;
@@ -439,13 +438,11 @@ public class HTTPHC3Impl extends HTTPHCA
         hc.setHost(host, port, protocol); // All needed to ensure re-usablility
 
         // Set up the local address if one exists
-        if (localAddress != null){
-            hc.setLocalAddress(localAddress);
+        final InetAddress inetAddr = getIpSourceAddress();
+        if (inetAddr != null) {// Use special field ip source address (for pseudo 'ip spoofing')
+            hc.setLocalAddress(inetAddr);
         } else {
-            final InetAddress inetAddr = getIpSourceAddress();
-            if (inetAddr != null) {// Use special field ip source address (for pseudo 'ip
spoofing')
-                hc.setLocalAddress(inetAddr);
-            }
+            hc.setLocalAddress(localAddress); // null means use the default
         }
 
         final String proxyHost = getProxyHost();

Modified: jmeter/trunk/xdocs/changes.xml
URL: http://svn.apache.org/viewvc/jmeter/trunk/xdocs/changes.xml?rev=1511691&r1=1511690&r2=1511691&view=diff
==============================================================================
--- jmeter/trunk/xdocs/changes.xml (original)
+++ jmeter/trunk/xdocs/changes.xml Thu Aug  8 11:04:58 2013
@@ -225,6 +225,7 @@ Previously the default was 1, which coul
 <li><bugzilla>55161</bugzilla> - Useless processing in SoapSampler.setPostHeaders</li>
 <li><bugzilla>54482</bugzilla> - HC fails to follow redirects with non-encoded
chars</li>
 <li><bugzilla>54142</bugzilla> - HTTP Proxy Server throws an exception
when path contains "|" character</li>
+<li><bugzilla>55388</bugzilla> - HC3 does not allow IP Source field to
override httpclient.localaddress</li>
 </ul>
 
 <h3>Other Samplers</h3>



Mime
View raw message