Package org.elasticsearch.common.netty.handler.codec.http

Examples of org.elasticsearch.common.netty.handler.codec.http.DefaultHttpResponse


        // Build the response object.
        HttpResponseStatus status = getStatus(response.status());
        org.elasticsearch.common.netty.handler.codec.http.HttpResponse resp;
        if (http10) {
            resp = new DefaultHttpResponse(HttpVersion.HTTP_1_0, status);
            if (!close) {
                resp.addHeader(HttpHeaders.Names.CONNECTION, "Keep-Alive");
            }
        } else {
            resp = new DefaultHttpResponse(HttpVersion.HTTP_1_1, status);
        }
        if (RestUtils.isBrowser(request.getHeader(HttpHeaders.Names.USER_AGENT))) {
            // add support for cross origin
            resp.addHeader("Access-Control-Allow-Origin", "*");
            if (request.getMethod() == HttpMethod.OPTIONS) {
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.netty.handler.codec.http.DefaultHttpResponse

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.