Decode both the key and the value when parsing the request URI

This commit is contained in:
Andrei Savu 2012-03-14 18:03:08 +02:00
parent fad4cee803
commit 89aefec026
2 changed files with 2 additions and 4 deletions

View File

@ -231,9 +231,7 @@ public class VirtualMachineClientLiveTest extends BaseCloudStackClientLiveTest {
@Override
public boolean apply(@Nullable Network network) {
return network.isDefault() &&
network.getGuestIPType() == GuestIPType.VIRTUAL &&
network.getNetworkOfferingId() == 6 &&
network.getId() == 204;
network.getGuestIPType() == GuestIPType.VIRTUAL;
}
}));
logger.info("Required network: " + requiredNetwork);

View File

@ -170,7 +170,7 @@ public class ModifyRequest {
int indexOfFirstEquals = stringToParse.indexOf('=');
String key = indexOfFirstEquals == -1 ? stringToParse : stringToParse.substring(0, indexOfFirstEquals);
String value = indexOfFirstEquals == -1 ? null : stringToParse.substring(indexOfFirstEquals + 1);
map.put(key, Strings2.urlDecode(value));
map.put(Strings2.urlDecode(key), Strings2.urlDecode(value));
}
public static String makeQueryLine(Multimap<String, String> params,