Merge pull request #736 from TeamPiped/fix-qstring

Fix null qstring
This commit is contained in:
Kavin 2023-11-20 06:10:51 +00:00 committed by GitHub
commit e0225d3e63
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -135,18 +135,16 @@ public class URLUtils {
StringBuilder qstring = null;
if (hasQuery) {
for (List<String> pair : queryPairs) {
if (qstring == null) {
qstring = new StringBuilder();
} else {
qstring.append("&");
}
qstring.append(pair.get(0));
qstring.append("=");
qstring.append(pair.get(1));
for (List<String> pair : queryPairs) {
if (qstring == null) {
qstring = new StringBuilder();
} else {
qstring.append("&");
}
qstring.append(pair.get(0));
qstring.append("=");
qstring.append(pair.get(1));
}
newUrl += "?" + qstring;