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

fschumacher pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/jmeter.git


The following commit(s) were added to refs/heads/master by this push:
     new d074091  Add support for IPv6 addresses when specifying a remote 
worker node
d074091 is described below

commit d0740914053bb74ac46edb586aa9a959f5015ac8
Author: Felix Schumacher <[email protected]>
AuthorDate: Sun Oct 10 21:10:09 2021 +0200

    Add support for IPv6 addresses when specifying a remote worker node
    
    Now it should be possible to specify an IPv6 address with the bracketed 
notation:
      remote_host=[::1]:2001
    
    Based on a patch by Peter Wong
    Closes #673
    Bugzilla Id: 65611
---
 .../src/main/java/org/apache/jmeter/engine/ClientJMeterEngine.java     | 3 ++-
 xdocs/changes.xml                                                      | 2 ++
 2 files changed, 4 insertions(+), 1 deletion(-)

diff --git 
a/src/core/src/main/java/org/apache/jmeter/engine/ClientJMeterEngine.java 
b/src/core/src/main/java/org/apache/jmeter/engine/ClientJMeterEngine.java
index 508d13e..44a8d51 100644
--- a/src/core/src/main/java/org/apache/jmeter/engine/ClientJMeterEngine.java
+++ b/src/core/src/main/java/org/apache/jmeter/engine/ClientJMeterEngine.java
@@ -58,7 +58,8 @@ public class ClientJMeterEngine implements JMeterEngine {
         final String name = RemoteJMeterEngineImpl.JMETER_ENGINE_RMI_NAME; // 
$NON-NLS-1$ $NON-NLS-2$
         String host = hostAndPort;
         int port = RmiUtils.DEFAULT_RMI_PORT;
-        int indexOfSeparator = hostAndPort.indexOf(':');
+        int closingBracket = hostAndPort.indexOf(']');
+        int indexOfSeparator = hostAndPort.indexOf(':', closingBracket);
         if (indexOfSeparator >= 0) {
             host = hostAndPort.substring(0, indexOfSeparator);
             String portAsString = hostAndPort.substring(indexOfSeparator+1);
diff --git a/xdocs/changes.xml b/xdocs/changes.xml
index a7152b7..267e52c 100644
--- a/xdocs/changes.xml
+++ b/xdocs/changes.xml
@@ -130,6 +130,7 @@ Summary
 <h3>General</h3>
 <ul>
   <li><bug>61805</bug><pr>663</pr>Add simple HTTP request template. 
Contributed by Ori Marko (orimarko at gmail.com)</li>
+  <li><bug>65611</bug><pr>673</pr>Add support for IPv6 addresses when 
specifying a remote worker node. Based on a patch by Peter Wong (peter.wong at 
csexperts.com)</li>
 </ul>
 
 <ch_section>Non-functional changes</ch_section>
@@ -263,6 +264,7 @@ Summary
   <li>Baptiste Gaillard (baptiste.gaillard at gmail.com)</li>
   <li>Rithvik Patibandla (rithvikp98 at gmail.com)</li>
   <li>Mariusz (mawasak at gmail.com)</li>
+  <li>[email protected]</li>
 </ul>
 <p>We also thank bug reporters who helped us improve JMeter.</p>
 <ul>

Reply via email to