X-Git-Url: https://code.wpia.club/?p=gigi.git;a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FLauncher.java;h=a7730adcc9d249350fa555affeb949b109aa919c;hp=763c21b4464ec893ff05088b82303fb6f6d96281;hb=a4a022f3ef3f697298fca60520d422d8662ec706;hpb=6c10d13f4178ee1c2be2e669371f0e885661c859 diff --git a/src/org/cacert/gigi/Launcher.java b/src/org/cacert/gigi/Launcher.java index 763c21b4..a7730adc 100644 --- a/src/org/cacert/gigi/Launcher.java +++ b/src/org/cacert/gigi/Launcher.java @@ -2,6 +2,7 @@ package org.cacert.gigi; import java.io.ByteArrayInputStream; import java.io.IOException; +import java.net.HttpURLConnection; import java.net.InetSocketAddress; import java.security.GeneralSecurityException; import java.security.Key; @@ -105,6 +106,7 @@ public class Launcher { public synchronized void boot() throws Exception { Locale.setDefault(Locale.ENGLISH); TimeZone.setDefault(TimeZone.getTimeZone("UTC")); + HttpURLConnection.setFollowRedirects(false); conf = GigiConfig.parse(System.in); ServerConstants.init(conf.getMainProps()); @@ -137,7 +139,7 @@ public class Launcher { if (conf.getMainProps().getProperty("proxy", "false").equals("true")) { httpConfig.addCustomizer(new ExtendedForwarded()); s.setConnectors(new Connector[] { - ConnectorsLauncher.createConnector(conf, s, httpConfig, false) + ConnectorsLauncher.createConnector(conf, s, httpConfig, false) }); } else { HttpConfiguration httpsConfig = createHttpConfiguration(); @@ -286,11 +288,11 @@ public class Launcher { ContextHandler ch = generateGigiServletContext(webAppServlet); ch.setVirtualHosts(new String[] { - ServerConstants.getWwwHostName() + ServerConstants.getWwwHostName() }); ContextHandler chSecure = generateGigiServletContext(webAppServlet); chSecure.setVirtualHosts(new String[] { - ServerConstants.getSecureHostName() + ServerConstants.getSecureHostName() }); HandlerList hl = new HandlerList(); @@ -332,7 +334,7 @@ public class Launcher { ContextHandler ch = new ContextHandler(); ch.setHandler(rh); ch.setVirtualHosts(new String[] { - ServerConstants.getStaticHostName() + ServerConstants.getStaticHostName() }); return ch; @@ -355,7 +357,7 @@ public class Launcher { ServletContextHandler sch = new ServletContextHandler(); sch.addVirtualHosts(new String[] { - ServerConstants.getApiHostName() + ServerConstants.getApiHostName() }); sch.addServlet(new ServletHolder(new GigiAPI()), "/*"); return sch;