File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
protocol/src/main/java/org/threadly/litesockets/protocols/http/shared Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -89,8 +89,9 @@ public static Map<String, List<String>> queryToMap(String query) {
8989 Map <String , List <String >> map = new HashMap <>();
9090 if (query .startsWith ("?" )) {
9191 query = query .substring (1 );
92- } else if (query .contains ("?" )){
93- int qpos = query .indexOf ("?" );
92+ }
93+ int qpos = query .indexOf ("?" );
94+ if (qpos >= 0 ){
9495 query = query .substring (qpos +1 );
9596 }
9697 String [] tmpQ = query .trim ().split ("&" );
@@ -100,7 +101,7 @@ public static Map<String, List<String>> queryToMap(String query) {
100101 // case where either no `=` or empty key string
101102 continue ;
102103 }
103- List <String > paramValues = map .computeIfAbsent (tmpkv [0 ], (ignored ) -> new ArrayList <>(1 ));
104+ List <String > paramValues = map .computeIfAbsent (tmpkv [0 ], (ignored ) -> new ArrayList <>(2 ));
104105 if (tmpkv .length == 1 ) {
105106 paramValues .add ("" );
106107 } else {
You can’t perform that action at this time.
0 commit comments