X-Git-Url: https://code.wpia.club/?a=blobdiff_plain;f=src%2Forg%2Fcacert%2Fgigi%2FLauncher.java;h=a7730adcc9d249350fa555affeb949b109aa919c;hb=6d1b746247f6e1eab7d1da17112beb9cf5abb089;hp=775823dc443a59991620f4529a57b40513efc135;hpb=07f74d10bddc819f4524e2e0c1a2815eb4e7ec79;p=gigi.git diff --git a/src/org/cacert/gigi/Launcher.java b/src/org/cacert/gigi/Launcher.java index 775823dc..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(); @@ -308,7 +310,7 @@ public class Launcher { hw.setHandler(rh); ServletContextHandler servlet = new ServletContextHandler(ServletContextHandler.SESSIONS); - servlet.setInitParameter(SessionManager.__SessionCookieProperty, "CACert-Session"); + servlet.setInitParameter(SessionManager.__SessionCookieProperty, "SomeCA-Session"); servlet.addServlet(webAppServlet, "/*"); ErrorPageErrorHandler epeh = new ErrorPageErrorHandler(); epeh.addErrorPage(404, "/error"); @@ -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;