wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java [547:582]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        StreamingWagon wagon = (StreamingWagon) getWagon();

        Server realServer = new Server();
        TestHeaderHandler handler = new TestHeaderHandler();

        realServer.setHandler(handler);
        addConnector(realServer);
        realServer.start();

        Server redirectServer = new Server();

        addConnector(redirectServer);

        String protocol = getProtocol();

        // protocol is wagon protocol but in fact dav is http(s)
        if (protocol.equals("dav")) {
            protocol = "http";
        }

        if (protocol.equals("davs")) {
            protocol = "https";
        }

        String redirectUrl = protocol + "://localhost:" + getLocalPort(realServer);

        RedirectHandler redirectHandler =
                new RedirectHandler("See Other", HttpServletResponse.SC_SEE_OTHER, redirectUrl, null);

        redirectServer.setHandler(redirectHandler);

        redirectServer.start();

        wagon.connect(new Repository("id", getRepositoryUrl(redirectServer)));

        File tmpResult = File.createTempFile("foo", "get");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



wagon-provider-test/src/main/java/org/apache/maven/wagon/http/HttpWagonTestCase.java [604:639]:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
        StreamingWagon wagon = (StreamingWagon) getWagon();

        Server realServer = new Server();
        TestHeaderHandler handler = new TestHeaderHandler();

        realServer.setHandler(handler);
        addConnector(realServer);
        realServer.start();

        Server redirectServer = new Server();

        addConnector(redirectServer);

        String protocol = getProtocol();

        // protocol is wagon protocol but in fact dav is http(s)
        if (protocol.equals("dav")) {
            protocol = "http";
        }

        if (protocol.equals("davs")) {
            protocol = "https";
        }

        String redirectUrl = protocol + "://localhost:" + getLocalPort(realServer);

        RedirectHandler redirectHandler =
                new RedirectHandler("See Other", HttpServletResponse.SC_SEE_OTHER, redirectUrl, null);

        redirectServer.setHandler(redirectHandler);

        redirectServer.start();

        wagon.connect(new Repository("id", getRepositoryUrl(redirectServer)));

        File tmpResult = File.createTempFile("foo", "get");
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -



