FSchumacher commented on code in PR #5809:
URL: https://github.com/apache/jmeter/pull/5809#discussion_r1172770856


##########
src/protocol/http/src/test/java/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTPTest.java:
##########
@@ -193,4 +194,20 @@ public void testGetQueryMapSoapHack() {
         Assert.assertEquals(query, param1.getValue()[0]);
         Assert.assertTrue(StringUtils.isBlank(param1.getKey()));
     }
+    
+    @Test
+    public void testGetQueryMapWithEmptyKeyAndValue() {
+        String query = "k1=v1&=&k2=v2";
+        Map<String, String[]> params = RequestViewHTTP.getQueryMap(query);
+        Assert.assertNotNull(params);
+        Assertions.assertEquals(2, params.size() + 1); // 2 params found

Review Comment:
   I think the comment is misleading and the assertion should be a different 
one.
   ```suggestion
           Assertions.assertEquals(1, params.size()); // first param is 
extracted, only
   ```
   The parsing will be stopped on the first error, which is the isolated `=`.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: dev-unsubscr...@jmeter.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to