Package io.undertow.server.handlers.encoding

Examples of io.undertow.server.handlers.encoding.AllowedContentEncodings


            @Override
            public StreamSinkConduit wrap(final ConduitFactory<StreamSinkConduit> factory, final HttpServerExchange exchange) {
                if(!responseCache.isResponseCachable()) {
                    return factory.create();
                }
                final AllowedContentEncodings contentEncodings = exchange.getAttachment(AllowedContentEncodings.ATTACHMENT_KEY);
                if(contentEncodings != null) {
                    if(!contentEncodings.isIdentity()) {
                        //we can't cache content encoded responses, as we have no idea how big they will end up being
                        return factory.create();
                    }
                }
                String lengthString = exchange.getResponseHeaders().getFirst(CONTENT_LENGTH);
View Full Code Here


        } else {
            this.lastModified = DateUtils.parseDate(lmString);
        }
        //the content encoding can be decided dynamically, based on the current state of the request
        //as the decision to compress generally depends on size and mime type
        final AllowedContentEncodings encoding = exchange.getAttachment(AllowedContentEncodings.ATTACHMENT_KEY);
        if(encoding != null) {
            this.contentEncoding = encoding.getCurrentContentEncoding();
        } else {
            this.contentEncoding = exchange.getResponseHeaders().getFirst(Headers.CONTENT_ENCODING);
        }
        this.responseCode = exchange.getResponseCode();
    }
View Full Code Here

        } else {
            this.lastModified = DateUtils.parseDate(lmString);
        }
        //the content encoding can be decided dynamically, based on the current state of the request
        //as the decision to compress generally dependends on size and mime type
        final AllowedContentEncodings encoding = exchange.getAttachment(AllowedContentEncodings.ATTACHMENT_KEY);
        if(encoding != null) {
            this.contentEncoding = encoding.getCurrentContentEncoding();
        } else {
            this.contentEncoding = exchange.getResponseHeaders().getFirst(Headers.CONTENT_ENCODING);
        }
        this.responseCode = exchange.getResponseCode();
    }
View Full Code Here

            @Override
            public StreamSinkConduit wrap(final ConduitFactory<StreamSinkConduit> factory, final HttpServerExchange exchange) {
                if(!responseCache.isResponseCachable()) {
                    return factory.create();
                }
                final AllowedContentEncodings contentEncodings = exchange.getAttachment(AllowedContentEncodings.ATTACHMENT_KEY);
                if(contentEncodings != null) {
                    if(!contentEncodings.isIdentity()) {
                        //we can't cache content encoded responses, as we have no idea how big they will end up being
                        return factory.create();
                    }
                }
                String lengthString = exchange.getResponseHeaders().getFirst(CONTENT_LENGTH);
View Full Code Here

        } else {
            this.lastModified = DateUtils.parseDate(lmString);
        }
        //the content encoding can be decided dynamically, based on the current state of the request
        //as the decision to compress generally depends on size and mime type
        final AllowedContentEncodings encoding = exchange.getAttachment(AllowedContentEncodings.ATTACHMENT_KEY);
        if(encoding != null) {
            this.contentEncoding = encoding.getCurrentContentEncoding();
        } else {
            this.contentEncoding = exchange.getResponseHeaders().getFirst(Headers.CONTENT_ENCODING);
        }
        this.responseCode = exchange.getResponseCode();
    }
View Full Code Here

            @Override
            public StreamSinkConduit wrap(final ConduitFactory<StreamSinkConduit> factory, final HttpServerExchange exchange) {
                if(!responseCache.isResponseCachable()) {
                    return factory.create();
                }
                final AllowedContentEncodings contentEncodings = exchange.getAttachment(AllowedContentEncodings.ATTACHMENT_KEY);
                if(contentEncodings != null) {
                    if(!contentEncodings.isIdentity()) {
                        //we can't cache content encoded responses, as we have no idea how big they will end up being
                        return factory.create();
                    }
                }
                String lengthString = exchange.getResponseHeaders().getFirst(CONTENT_LENGTH);
View Full Code Here

TOP

Related Classes of io.undertow.server.handlers.encoding.AllowedContentEncodings

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.