Package org.tamacat.httpd.config

Examples of org.tamacat.httpd.config.ServiceUrl


  TestAuthComponent authComponent;
 
  @Before
  public void setUp() throws Exception {
    config = new ServerConfig();
    ServiceUrl serviceUrl = new ServiceUrl(config);
    auth = new FormAuthProcessor();
    auth.init(serviceUrl);

    authComponent = new TestAuthComponent();
    authComponent.setAuthUsername("admin");
View Full Code Here


  }
 
  @Test
  public void testRewriteLocationHeader() throws Exception {
    ServerConfig config = new ServerConfig();
    ServiceUrl serviceUrl = new ServiceUrl(config);
    serviceUrl.setPath("/examples/");
    serviceUrl.setType(ServiceType.REVERSE);
    serviceUrl.setHost(new URL("http://localhost/examples/servlets"));
    ReverseUrl reverseUrl = new DefaultReverseUrl(serviceUrl);
    reverseUrl.setReverse(new URL("http://localhost:8080/examples/"));
   
    HttpResponse response = new BasicHttpResponse(
        new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 302, "Moved Temporarily"))
View Full Code Here

  }

  @Test
  public void testRewriteContentLocationHeader() throws Exception {
    ServerConfig config = new ServerConfig();
    ServiceUrl serviceUrl = new ServiceUrl(config);
    serviceUrl.setPath("/examples/");
    serviceUrl.setType(ServiceType.REVERSE);
    serviceUrl.setHost(new URL("http://localhost/examples/servlets"));
    ReverseUrl reverseUrl = new DefaultReverseUrl(serviceUrl);
    reverseUrl.setReverse(new URL("http://localhost:8080/examples/"));
   
    HttpResponse response = new BasicHttpResponse(
        new BasicStatusLine(new ProtocolVersion("HTTP", 1, 1), 302, "Moved Temporarily"))
View Full Code Here

  }
 
  @Test
  public void testRewriteSetCookieHeader() throws Exception {
    ServerConfig config = new ServerConfig();
    ServiceUrl serviceUrl = new ServiceUrl(config);
    serviceUrl.setPath("/examples/");
    serviceUrl.setType(ServiceType.REVERSE);
    serviceUrl.setHost(new URL("http://www.example.com/examples/servlets"));
    ReverseUrl reverseUrl = new DefaultReverseUrl(serviceUrl);
    reverseUrl.setReverse(new URL("http://192.168.1.1:8080/examples/"));
   
    HttpRequest request = new BasicHttpRequest("GET", "/examples/servlets");
    request.setHeader("Host", "www.example.com");
View Full Code Here

  @Before
  public void setUp() throws Exception {
    handler = new ReverseProxyHandler();

    ServerConfig serverConfig = new ServerConfig(PropertyUtils.getProperties("server.properties"));
    ServiceUrl serviceUrl = new ServiceUrl(serverConfig);
   
    serviceUrl.setPath("/test/");
    serviceUrl.setType(ServiceType.REVERSE);
    serviceUrl.setHost(new URL("http://localhost/test/"));   
    DefaultReverseUrl reverseUrl = new DefaultReverseUrl(serviceUrl);
    reverseUrl.setReverse(new URL("http://localhost/test/"));
    //serviceUrl.setReverseUrl(reverseUrl);
   
    handler.setServiceUrl(serviceUrl);
View Full Code Here

TOP

Related Classes of org.tamacat.httpd.config.ServiceUrl

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.