Correctly handle POSTed parameter also with HTTPS activated

pull/42/head
otter 9 years ago
parent f6e6250b83
commit c3c5e7928b

@ -51,7 +51,7 @@ public class PerformanceMemory_p {
private static final long MB = 1024 * KB; private static final long MB = 1024 * KB;
public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) { public static serverObjects respond(@SuppressWarnings("unused") final RequestHeader header, final serverObjects post, final serverSwitch env) {
// return variable that accumulates replacements // return variable that accumulates replacements
Switchboard sb = (Switchboard) env; Switchboard sb = (Switchboard) env;
final serverObjects prop = new serverObjects(); final serverObjects prop = new serverObjects();
@ -59,17 +59,19 @@ public class PerformanceMemory_p {
prop.put("gc", "0"); prop.put("gc", "0");
prop.put("autoreload.checked", "0"); prop.put("autoreload.checked", "0");
if (post != null) { if (post != null) {
if (post.containsKey("gc")) { if (post.containsKey("gc")) {
System.gc(); System.gc();
prop.put("gc", "1"); prop.put("gc", "1");
prop.put("autoreload.checked", "1"); prop.put("autoreload.checked", "1");
} else { } else {
boolean simulatedshortmemory = post.containsKey("simulatedshortmemory"); if (post.containsKey("dummy")) {
MemoryControl.setSimulatedShortStatus(simulatedshortmemory); boolean simulatedshortmemory = post.containsKey("simulatedshortmemory");
if (simulatedshortmemory) prop.put("autoreload.checked", "1"); MemoryControl.setSimulatedShortStatus(simulatedshortmemory);
final boolean std = post.containsKey("useStandardmemoryStrategy"); if (simulatedshortmemory) prop.put("autoreload.checked", "1");
env.setConfig("memory.standardStrategy", std); final boolean std = post.containsKey("useStandardmemoryStrategy");
MemoryControl.setStandardStrategy(std); env.setConfig("memory.standardStrategy", std);
MemoryControl.setStandardStrategy(std);
}
} }
} }

Loading…
Cancel
Save