Package org.apache.commons.httpclient

Examples of org.apache.commons.httpclient.StatusLine


    public HttpResponse readResponse() throws IOException
    {
        try
        {
            String line = readLine();
            return new HttpResponse(new StatusLine(line), HttpParser.parseHeaders(this.in, encoding), this.in);
        }
        catch (IOException e)
        {
            close();
            throw e;
View Full Code Here


            gm.setFollowRedirects( true );

            cl.executeMethod( gm );

            StatusLine sl = gm.getStatusLine();

            if ( sl == null )
            {
                getLog().error( "Unknown error validating link: " + link );
View Full Code Here

            if (line == null) {
                setKeepAlive(false);
                return null;
            }
            SimpleResponse response = new SimpleResponse(
                    new StatusLine(line),
                    HttpParser.parseHeaders(this.in, HTTP_ELEMENT_CHARSET),
                    this.in);
            return response;
        } catch (IOException e) {
            close();
View Full Code Here

     * @see #statusLineToElement(org.w3c.dom.Document, org.apache.commons.httpclient.StatusLine)
     */
    public static Element statusLineToElement
            (String
                    statusLine) throws HttpException {
        return statusLineToElement(new StatusLine(statusLine));
    }
View Full Code Here

            gm.setFollowRedirects( true );

            cl.executeMethod( gm );

            StatusLine sl = gm.getStatusLine();

            if ( sl == null )
            {
                getLog().error( "Unknown error validating link: " + link );
View Full Code Here

                setKeepAlive(false);

                return null;
            }

            SimpleResponse response = new SimpleResponse(new StatusLine(line),
                    HttpParser.parseHeaders(this.in, HTTP_ELEMENT_CHARSET),
                    this.in);

            return response;
        } catch (IOException e) {
View Full Code Here

                setKeepAlive(false);

                return null;
            }

            SimpleResponse response = new SimpleResponse(new StatusLine(line),
                    HttpParser.parseHeaders(this.in, HTTP_ELEMENT_CHARSET),
                    this.in);

            return response;
        } catch (IOException e) {
View Full Code Here

            if (line == null) {
                setKeepAlive(false);
                return null;
            }
            SimpleResponse response = new SimpleResponse(
                    new StatusLine(line),
                    HttpParser.parseHeaders(this.in, HTTP_ELEMENT_CHARSET),
                    this.in);
            return response;
        } catch (IOException e) {
            close();
View Full Code Here

            if (line == null) {
                setKeepAlive(false);
                return null;
            }
            SimpleResponse response = new SimpleResponse(
                    new StatusLine(line),
                    HttpParser.parseHeaders(this.in, HTTP_ELEMENT_CHARSET),
                    this.in);
            return response;
        } catch (IOException e) {
            close();
View Full Code Here

    {
        int statusCode = context.getStatusCode();
        // FIXME: Why do this only for HTTP Proxy? Why not WebServices?
        if (statusCode >= 400 && statusCode != 401 & statusCode != 403 && !context.isSoapRequest())
        {
            StatusLine statusLine = context.getHttpMethod().getStatusLine();
            String reason = null;

            if (statusLine != null)
                reason = statusLine.toString();

            if (reason == null || "".equals(reason))
                reason = String.valueOf(statusCode);

            ProxyException pe = new ProxyException();
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.StatusLine

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.