Package org.apache.commons.httpclient.server

Examples of org.apache.commons.httpclient.server.SimpleResponse


                    final SimpleRequest request) throws IOException {

                // Make sure the request if fully consumed
                request.getBodyBytes();
               
                SimpleResponse response = new SimpleResponse();
                response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK);
                response.setBodyString("stuff back");

                conn.setKeepAlive(true);
                conn.writeResponse(response);
               
                return true;
View Full Code Here


                    final SimpleRequest request) throws IOException {

                // Make sure the request if fully consumed
                request.getBodyBytes();
               
                SimpleResponse response = new SimpleResponse();
                response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK);
                response.setBodyString("stuff back");

                conn.setKeepAlive(true);
                conn.writeResponse(response);
               
                return true;
View Full Code Here

                    final SimpleRequest request) throws IOException {

                // Make sure the request if fully consumed
                request.getBodyBytes();
               
                SimpleResponse response = new SimpleResponse();
                response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK);
                response.setBodyString("stuff back");

                conn.setKeepAlive(true);
                conn.writeResponse(response);
               
                return true;
View Full Code Here

            {
                HttpVersion ver = request.getRequestLine().getHttpVersion();
                if (ver.equals(HttpVersion.HTTP_1_0)) {
                    return false;
                } else {
                    SimpleResponse response = new SimpleResponse();
                    response.setStatusLine(ver, HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
                    response.addHeader(new Header("Proxy-Connection", "close"));
                    conn.setKeepAlive(false);
                    // Make sure the request body is fully consumed
                    request.getBodyBytes();
                    conn.writeResponse(response);
                    return true;
View Full Code Here

            {
                HttpVersion ver = request.getRequestLine().getHttpVersion();
                if (ver.equals(HttpVersion.HTTP_1_0)) {
                    return false;
                } else {
                    SimpleResponse response = new SimpleResponse();
                    response.setStatusLine(ver, HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
                    response.addHeader(new Header("Proxy-Connection", "close"));
                    conn.setKeepAlive(false);
                    // Make sure the request body is fully consumed
                    request.getBodyBytes();
                    conn.writeResponse(response);
                    return true;
View Full Code Here

                    final SimpleRequest request) throws IOException {

                // Make sure the request if fully consumed
                request.getBodyBytes();
               
                SimpleResponse response = new SimpleResponse();
                response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK);
                response.setBodyString("stuff back");

                conn.setKeepAlive(true);
                conn.writeResponse(response);
               
                return true;
View Full Code Here

            {
                HttpVersion ver = request.getRequestLine().getHttpVersion();
                if (ver.equals(HttpVersion.HTTP_1_0)) {
                    return false;
                } else {
                    SimpleResponse response = new SimpleResponse();
                    response.setStatusLine(ver, HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
                    response.addHeader(new Header("Proxy-Connection", "close"));
                    conn.setKeepAlive(false);
                    // Make sure the request body is fully consumed
                    request.getBodyBytes();
                    conn.writeResponse(response);
                    return true;
View Full Code Here

                    final SimpleRequest request) throws IOException {

                // Make sure the request if fully consumed
                request.getBodyBytes();
               
                SimpleResponse response = new SimpleResponse();
                response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK);
                response.setBodyString("stuff back");

                conn.setKeepAlive(true);
                conn.writeResponse(response);
               
                return true;
View Full Code Here

            {
                HttpVersion ver = request.getRequestLine().getHttpVersion();
                if (ver.equals(HttpVersion.HTTP_1_0)) {
                    return false;
                } else {
                    SimpleResponse response = new SimpleResponse();
                    response.setStatusLine(ver, HttpStatus.SC_HTTP_VERSION_NOT_SUPPORTED);
                    response.addHeader(new Header("Proxy-Connection", "close"));
                    conn.setKeepAlive(false);
                    // Make sure the request body is fully consumed
                    request.getBodyBytes();
                    conn.writeResponse(response);
                    return true;
View Full Code Here

                    final SimpleRequest request) throws IOException {

                // Make sure the request if fully consumed
                request.getBodyBytes();
               
                SimpleResponse response = new SimpleResponse();
                response.setStatusLine(HttpVersion.HTTP_1_1, HttpStatus.SC_OK);
                response.setBodyString("stuff back");

                conn.setKeepAlive(true);
                conn.writeResponse(response);
               
                return true;
View Full Code Here

TOP

Related Classes of org.apache.commons.httpclient.server.SimpleResponse

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.