@ -463,13 +463,38 @@ public final class RequestTemplate implements Serializable {
@@ -463,13 +463,38 @@ public final class RequestTemplate implements Serializable {
firstQueries.putAll(queries);
queries.clear();
}
queries.putAll(firstQueries);
//Since we decode all queries, we want to use the
//query()-method to re-add them to ensure that all
//logic (such as url-encoding) are executed, giving
//a valid queryLine()
for(Stringkey:firstQueries.keySet()){
Collection<String>values=firstQueries.get(key);
if(allValuesAreNull(values)){
//Queryies where all values are null will
//be ignored by the query(key, value)-method
//So we manually avoid this case here, to ensure that
//we still fulfill the contract (ex. parameters without values)