Package org.apache.commons.httpclient.server

Examples of org.apache.commons.httpclient.server.SimpleProxy$SimpleChain


        }
    }

    public void testAbsoluteURLOverridesDefaultHostParam() throws IOException {

        this.proxy = new SimpleProxy();
       
        this.server.setHttpService(new EchoService());
        // reset default host configuration
        HostConfiguration hostconfig = new HostConfiguration();
        hostconfig.setHost("somehwere.outthere.in.pampa", 9999);
View Full Code Here


                this.server.getLocalAddress(),
                this.server.getLocalPort(),
                testhttp);
       
        if (this.useProxy) {
            this.proxy = new SimpleProxy();
            client.getHostConfiguration().setProxy(
                proxy.getLocalAddress(),
                proxy.getLocalPort());               
        }
    }
View Full Code Here

        assertFalse(connman.getConection().isOpen());
    }

    public void testProxyConnClose() throws Exception {
        this.server.setHttpService(new EchoService());
        this.proxy = new SimpleProxy();
        this.client.getHostConfiguration().setProxy(
            proxy.getLocalAddress(),
            proxy.getLocalPort());               

        AccessibleHttpConnectionManager connman = new AccessibleHttpConnectionManager();
View Full Code Here

        }
    }

    public void testAbsoluteURLOverridesDefaultHostParam() throws IOException {

        this.proxy = new SimpleProxy();
       
        this.server.setHttpService(new EchoService());
        // reset default host configuration
        HostConfiguration hostconfig = new HostConfiguration();
        hostconfig.setHost("somehwere.outthere.in.pampa", 9999);
View Full Code Here

                this.server.getLocalAddress(),
                this.server.getLocalPort(),
                testhttp);
       
        if (this.useProxy) {
            this.proxy = new SimpleProxy();
            client.getHostConfiguration().setProxy(
                proxy.getLocalAddress(),
                proxy.getLocalPort());               
        }
    }
View Full Code Here

                this.server.getLocalAddress(),
                this.server.getLocalPort(),
                testhttp);
       
        if (this.useProxy) {
            this.proxy = new SimpleProxy();
            client.getHostConfiguration().setProxy(
                proxy.getLocalAddress(),
                proxy.getLocalPort());               
        }
    }
View Full Code Here

        System.setProperty("org.apache.commons.logging.simplelog.log.org.apache.commons.httpclient", "debug");
        */
    }
   
    public void testSimpleGet() throws Exception {
        SimpleProxy proxy = new SimpleProxy();
       
        HttpClient client = new HttpClient();
        HostConfiguration hc = new HostConfiguration();
        hc.setHost("localhost", 8080, Protocol.getProtocol("http"));
        hc.setProxy(proxy.getLocalAddress(), proxy.getLocalPort());
        client.setHostConfiguration(hc);
       
        GetMethod get = new GetMethod("/");
        client.executeMethod(get);
        assertEquals(200, get.getStatusCode());
View Full Code Here

        get.releaseConnection();
    }
   
    public void testAuthGet() throws Exception {
        Credentials creds = new UsernamePasswordCredentials("user", "password");
        SimpleProxy proxy = new SimpleProxy();
        proxy.requireCredentials(creds);
       
        HttpClient client = new HttpClient();
        HostConfiguration hc = new HostConfiguration();
        hc.setHost("localhost", 8080, Protocol.getProtocol("http"));
        hc.setProxy(proxy.getLocalAddress(), proxy.getLocalPort());
        client.setHostConfiguration(hc);
        client.getState().setProxyCredentials(null, null, creds);
       
        GetMethod get = new GetMethod("/");
        client.executeMethod(get);
View Full Code Here

        }
    }

    public void testAbsoluteURLOverridesDefaultHostParam() throws IOException {

        this.proxy = new SimpleProxy();
       
        this.server.setHttpService(new EchoService());
        // reset default host configuration
        HostConfiguration hostconfig = new HostConfiguration();
        hostconfig.setHost("somehwere.outthere.in.pampa", 9999);
View Full Code Here

        assertFalse(connman.getConection().isOpen());
    }

    public void testProxyConnClose() throws Exception {
        this.server.setHttpService(new EchoService());
        this.proxy = new SimpleProxy();
        this.client.getHostConfiguration().setProxy(
            proxy.getLocalAddress(),
            proxy.getLocalPort());               

        AccessibleHttpConnectionManager connman = new AccessibleHttpConnectionManager();
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.server.SimpleProxy$SimpleChain

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.