From c3c5e7928b1bcf73eefb440e1ba5c90b364beba3 Mon Sep 17 00:00:00 2001 From: otter Date: Sat, 6 Feb 2016 20:22:17 +0100 Subject: [PATCH] Correctly handle POSTed parameter also with HTTPS activated --- htroot/PerformanceMemory_p.java | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/htroot/PerformanceMemory_p.java b/htroot/PerformanceMemory_p.java index 50535d2ea..9497f55d3 100644 --- a/htroot/PerformanceMemory_p.java +++ b/htroot/PerformanceMemory_p.java @@ -51,7 +51,7 @@ public class PerformanceMemory_p { private static final long MB = 1024 * KB; 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; final serverObjects prop = new serverObjects(); @@ -59,17 +59,19 @@ public class PerformanceMemory_p { prop.put("gc", "0"); prop.put("autoreload.checked", "0"); if (post != null) { - if (post.containsKey("gc")) { + if (post.containsKey("gc")) { System.gc(); prop.put("gc", "1"); prop.put("autoreload.checked", "1"); } else { - boolean simulatedshortmemory = post.containsKey("simulatedshortmemory"); - MemoryControl.setSimulatedShortStatus(simulatedshortmemory); - if (simulatedshortmemory) prop.put("autoreload.checked", "1"); - final boolean std = post.containsKey("useStandardmemoryStrategy"); - env.setConfig("memory.standardStrategy", std); - MemoryControl.setStandardStrategy(std); + if (post.containsKey("dummy")) { + boolean simulatedshortmemory = post.containsKey("simulatedshortmemory"); + MemoryControl.setSimulatedShortStatus(simulatedshortmemory); + if (simulatedshortmemory) prop.put("autoreload.checked", "1"); + final boolean std = post.containsKey("useStandardmemoryStrategy"); + env.setConfig("memory.standardStrategy", std); + MemoryControl.setStandardStrategy(std); + } } }