Skip to content

Commit

Permalink
Merge pull request #736 from TeamPiped/fix-qstring
Browse files Browse the repository at this point in the history
Fix null qstring
  • Loading branch information
FireMasterK authored Nov 20, 2023
2 parents 88c9c40 + fdbeffa commit e0225d3
Showing 1 changed file with 9 additions and 11 deletions.
20 changes: 9 additions & 11 deletions src/main/java/me/kavin/piped/utils/URLUtils.java
Original file line number Diff line number Diff line change
Expand Up @@ -135,18 +135,16 @@ public static String rewriteURL(final String old, final String proxy) {

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;
Expand Down

0 comments on commit e0225d3

Please sign in to comment.