FSchumacher commented on code in PR #5808:
URL: https://github.com/apache/jmeter/pull/5808#discussion_r1172716628
##########
src/protocol/http/src/main/java/org/apache/jmeter/protocol/http/visualizers/RequestViewHTTP.java:
##########
@@ -287,6 +287,9 @@ public static Map<String, String[]> getQueryMap(String
query) {
String[] params = query.split(PARAM_CONCATENATE);
for (String param : params) {
String[] paramSplit = param.split("=");
+ if (paramSplit.length == 0) { // Bug Github 5807
Review Comment:
I don't think the Bug reference is needed here, but I would love to see a
unit test :)
```java
public class RequestViewHTTPTest extends TestCase {
@Test
void testGetQueryMapWithEmptyKeyAndValue() {
String query = "=";
Map<String, String[]> params = RequestViewHTTP.getQueryMap(query);
Assert.assertNotNull(params);
Assertions.assertEquals(0, params.size());
}
...
```
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]