Permalink
Browse files

ensure the magic jvm system property is set in the most targetted way

  • Loading branch information...
1 parent e176b14 commit eb79e9883e0509ef9275d9e068630efa33dfdb72 @scarytom scarytom committed May 3, 2012
@@ -25,6 +25,10 @@
private final String targetHost;
private final int targetPort;
+ static {
+ System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
+ }
+
public static Container create(Monitor monitor, String targetHost, int targetPort) {
return new DefensiveHandler(monitor, new ProxyingHandler(monitor, targetHost, targetPort));
}
@@ -36,10 +36,6 @@
}
};
- static {
- System.setProperty("sun.net.http.allowRestrictedHeaders", "true");
- }
-
public BlondinServer(Monitor monitor, int blondinPort, String targetHost, int targetPort,
URL expensiveResourcesUrl, int throttleSize) throws IOException {
this.monitor = monitor;

0 comments on commit eb79e98

Please sign in to comment.