Package io.undertow.conduits

Examples of io.undertow.conduits.HeadStreamSinkConduit


    private static ConduitWrapper<StreamSinkConduit> responseWrapper(final boolean requestLooksPersistent) {
        return new ConduitWrapper<StreamSinkConduit>() {
            public StreamSinkConduit wrap(final ConduitFactory<StreamSinkConduit> factory, final HttpServerExchange exchange) {
                if(exchange.getRequestMethod().equals(Methods.HEAD)) {
                    return new HeadStreamSinkConduit(factory.create(), terminateResponseListener(exchange));
                }
                final StreamSinkConduit channel = factory.create();
                final HeaderMap responseHeaders = exchange.getResponseHeaders();
                // test to see if we're still persistent
                String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here


    private static ConduitWrapper<StreamSinkConduit> responseWrapper(final boolean requestLooksPersistent) {
        return new ConduitWrapper<StreamSinkConduit>() {
            public StreamSinkConduit wrap(final ConduitFactory<StreamSinkConduit> factory, final HttpServerExchange exchange) {
                if(exchange.getRequestMethod().equals(Methods.HEAD)) {
                    return new HeadStreamSinkConduit(factory.create(), terminateResponseListener(exchange));
                }
                final StreamSinkConduit channel = factory.create();
                final HeaderMap responseHeaders = exchange.getResponseHeaders();
                // test to see if we're still persistent
                boolean stillPersistent = requestLooksPersistent && exchange.isPersistent();
View Full Code Here

        StreamSinkConduit channel = responseConduit;
        if (headRequest) {
            //if this is a head request we add a head channel underneath the content encoding channel
            //this will just discard the data
            //we still go through with the rest of the logic, to make sure all headers are set correctly
            channel = new HeadStreamSinkConduit(channel, terminateResponseListener(exchange));
        }

        final HeaderMap responseHeaders = exchange.getResponseHeaders();
        // test to see if we're still persistent
        String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

        StreamSinkConduit channel = responseConduit;
        if (headRequest) {
            //if this is a head request we add a head channel underneath the content encoding channel
            //this will just discard the data
            //we still go through with the rest of the logic, to make sure all headers are set correctly
            channel = new HeadStreamSinkConduit(channel, terminateResponseListener(exchange));
        }

        final HeaderMap responseHeaders = exchange.getResponseHeaders();
        // test to see if we're still persistent
        String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

        StreamSinkConduit channel = responseConduit;
        if (headRequest) {
            //if this is a head request we add a head channel underneath the content encoding channel
            //this will just discard the data
            //we still go through with the rest of the logic, to make sure all headers are set correctly
            channel = new HeadStreamSinkConduit(channel, terminateResponseListener(exchange));
        }

        final HeaderMap responseHeaders = exchange.getResponseHeaders();
        // test to see if we're still persistent
        String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

            StreamSinkConduit channel = factory.create();
            final ConduitListener<StreamSinkConduit> finishListener = terminateResponseListener(exchange);
            if (exchange.getRequestMethod().equals(Methods.HEAD)) {
                //if this is a head request we add a head channel underneath the content encoding channel
                //this will just discard the data
                channel = new HeadStreamSinkConduit(channel, null);
            }

            final HeaderMap responseHeaders = exchange.getResponseHeaders();
            // test to see if we're still persistent
            String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

            boolean headRequest = exchange.getRequestMethod().equals(Methods.HEAD);
            if (headRequest) {
                //if this is a head request we add a head channel underneath the content encoding channel
                //this will just discard the data
                //we still go through with the rest of the logic, to make sure all headers are set correctly
                channel = new HeadStreamSinkConduit(channel, finishListener);
            }

            final HeaderMap responseHeaders = exchange.getResponseHeaders();
            // test to see if we're still persistent
            String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

            boolean headRequest = exchange.getRequestMethod().equals(Methods.HEAD);
            if (headRequest) {
                //if this is a head request we add a head channel underneath the content encoding channel
                //this will just discard the data
                //we still go through with the rest of the logic, to make sure all headers are set correctly
                channel = new HeadStreamSinkConduit(channel, finishListener);
            }

            final HeaderMap responseHeaders = exchange.getResponseHeaders();
            // test to see if we're still persistent
            String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

    private static ConduitWrapper<StreamSinkConduit> responseWrapper(final boolean requestLooksPersistent) {
        return new ConduitWrapper<StreamSinkConduit>() {
            public StreamSinkConduit wrap(final ConduitFactory<StreamSinkConduit> factory, final HttpServerExchange exchange) {
                if (exchange.getRequestMethod().equals(Methods.HEAD)) {
                    return new HeadStreamSinkConduit(factory.create(), terminateResponseListener(exchange));
                }
                final StreamSinkConduit channel = factory.create();
                final HeaderMap responseHeaders = exchange.getResponseHeaders();
                // test to see if we're still persistent
                String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

        StreamSinkConduit channel = responseConduit;
        if (headRequest) {
            //if this is a head request we add a head channel underneath the content encoding channel
            //this will just discard the data
            //we still go through with the rest of the logic, to make sure all headers are set correctly
            channel = new HeadStreamSinkConduit(channel, terminateResponseListener(exchange));
        }

        final HeaderMap responseHeaders = exchange.getResponseHeaders();
        // test to see if we're still persistent
        String connection = responseHeaders.getFirst(Headers.CONNECTION);
View Full Code Here

TOP

Related Classes of io.undertow.conduits.HeadStreamSinkConduit

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.