Package org.eclipse.jetty.client

Examples of org.eclipse.jetty.client.HttpResponse


    public void badMessage(int status, String reason)
    {
        HttpExchange exchange = getHttpExchange();
        if (exchange != null)
        {
            HttpResponse response = exchange.getResponse();
            response.status(status).reason(reason);
            failAndClose(new HttpResponseException("HTTP protocol violation: bad response on " + getHttpConnection(), response));
        }
    }
View Full Code Here


        if (exchange == null)
            return;

        try
        {
            HttpResponse response = exchange.getResponse();

            Fields fields = replyInfo.getHeaders();
            short spdy = stream.getSession().getVersion();
            HttpVersion version = HttpVersion.fromString(fields.get(HTTPSPDYHeader.VERSION.name(spdy)).getValue());
            response.version(version);
            String[] status = fields.get(HTTPSPDYHeader.STATUS.name(spdy)).getValue().split(" ", 2);

            Integer code = Integer.parseInt(status[0]);
            response.status(code);
            String reason = status.length < 2 ? HttpStatus.getMessage(code) : status[1];
            response.reason(reason);

            if (responseBegin(exchange))
            {
                for (Fields.Field field : fields)
                {
View Full Code Here

    public void badMessage(int status, String reason)
    {
        HttpExchange exchange = getHttpExchange();
        if (exchange != null)
        {
            HttpResponse response = exchange.getResponse();
            response.status(status).reason(reason);
            failAndClose(new HttpResponseException("HTTP protocol violation: bad response", response));
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.jetty.client.HttpResponse

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.