Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -140,10 +140,13 @@ static Map<String, String> parseQueryString(String query) {
String[] pairs = query.split("&");
for (String pair : pairs) {
String[] keyValue = pair.split("=");
if (keyValue.length != 2) {
throw new IllegalArgumentException("invalid query to be parsed.");
if (keyValue.length == 1) {
map.put(keyValue[0], "");
} else if (keyValue.length == 2) {
map.put(keyValue[0], keyValue[1]);
} else {
throw new IllegalArgumentException("invalid query to be parsed.");
}
map.put(keyValue[0], keyValue[1]);
}

return map;
Expand Down