Examples of HttpURL


Examples of org.apache.commons.httpclient.HttpURL

        if (!parent.getPath().endsWith("/")) {
            parent.setPath(parent.getPath() + "/");
        }

        return new HttpURL(parent, childPath);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

        }

        /* Create the base URL */
        String url = configuration.getChild("url").getValue(null);
        try {
            if (url != null) this.url = new HttpURL(url);
        } catch (URIException e) {
            throw new ConfigurationException("Cannot process URL \"" + url + "\" specified"
                    + " at " + configuration.getChild("url").getLocation());
        }

View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

                req = overrideParams(req, name, value);
            }
        }

        /* Process the current source URL in relation to the configured one */
        HttpURL src = (super.source == null ? null : new HttpURL(super.source));
        if (this.url != null) src = (src == null ? this.url : new HttpURL(this.url, src));
        if (src == null) throw new ProcessingException("No URL specified");
        if (src.isRelativeURI()) {
            throw new ProcessingException("Invalid URL \"" + src.toString() + "\"");
        }

        /* Configure the method with the resolved URL */
        HostConfiguration hc = new HostConfiguration();
        hc.setHost(src);
        this.method.setHostConfiguration(hc);
        this.method.setPath(src.getPath());
        this.method.setQueryString(src.getQuery());

        /* And now process the query string (from the parameters above) */
        if (qry.size() > 0) {
            String qs = this.method.getQueryString();
            NameValuePair nvpa[] = new NameValuePair[qry.size()];
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

                String myURI = httpURL.getEscapedURI();
                workingResource.setHttpURL(
                    httpURL instanceof HttpsURL
                    ? new HttpsURL(myURI + (myURI.endsWith("/") ? "" : "/")
                                   + URIUtil.encodePath(displayName))
                    : new HttpURL(myURI + (myURI.endsWith("/") ? "" : "/")
                                  + URIUtil.encodePath(displayName)),
                    NOACTION, defaultDepth);
                workingResource.setExistence(true);
                workingResource.setOverwrite(getOverwrite());
            }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

        if (creds instanceof UsernamePasswordCredentials) {
            UsernamePasswordCredentials upc = (UsernamePasswordCredentials) creds;
            userName = upc.getUserName();
            password = upc.getPassword();
        }
        HttpURL clientHttpURL =
            new HttpURL(userName, password,
                        client.getHost(), client.getPort());

        return clientHttpURL.getAuthority().equals(httpURL.getAuthority());
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

        (HttpURL httpURL, String additionalPath, int action, int depth)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath), action, depth);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

        (HttpURL httpURL, String additionalPath, int action)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath),
                   action, defaultDepth);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

    public void setHttpURL(HttpURL httpURL, String additionalPath)
        throws HttpException, IOException {

        setHttpURL(httpURL instanceof HttpsURL
                   ? new HttpsURL((HttpsURL) httpURL, additionalPath)
                   : new HttpURL(httpURL, additionalPath),
                   defaultAction, defaultDepth);
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

    public void setHttpURL(String escapedHttpURL)
        throws HttpException, IOException {

        setHttpURL(escapedHttpURL.startsWith("https")
                   ? new HttpsURL(escapedHttpURL)
                   : new HttpURL(escapedHttpURL));
    }
View Full Code Here

Examples of org.apache.commons.httpclient.HttpURL

     */
    public HttpURL getHttpURLExceptForUserInfo()
        throws URIException {

        return httpURL instanceof HttpsURL ? new HttpsURL(httpURL.getRawURI())
                                           : new HttpURL(httpURL.getRawURI());
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.