Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 48867 invoked from network); 22 Jul 2008 10:24:59 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 22 Jul 2008 10:24:59 -0000 Received: (qmail 93294 invoked by uid 500); 22 Jul 2008 10:24:52 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 93267 invoked by uid 500); 22 Jul 2008 10:24:52 -0000 Mailing-List: contact issues-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list issues@cxf.apache.org Received: (qmail 93233 invoked by uid 99); 22 Jul 2008 10:24:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 03:24:52 -0700 X-ASF-Spam-Status: No, hits=-2000.0 required=10.0 tests=ALL_TRUSTED X-Spam-Check-By: apache.org Received: from [140.211.11.140] (HELO brutus.apache.org) (140.211.11.140) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 22 Jul 2008 10:24:06 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id E8CCC234C176 for ; Tue, 22 Jul 2008 03:24:31 -0700 (PDT) Message-ID: <552194654.1216722271952.JavaMail.jira@brutus> Date: Tue, 22 Jul 2008 03:24:31 -0700 (PDT) From: "Ian Roberts (JIRA)" To: issues@cxf.apache.org Subject: [jira] Commented: (CXF-1387) Support for GZIP compression of HTTP payloads MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-Virus-Checked: Checked by ClamAV on apache.org [ https://issues.apache.org/jira/browse/CXF-1387?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12615571#action_12615571 ] Ian Roberts commented on CXF-1387: ---------------------------------- They're not enabled by default, as far as I know. You need to add a GZIPFeature to your endpoint or Bus. > Support for GZIP compression of HTTP payloads > --------------------------------------------- > > Key: CXF-1387 > URL: https://issues.apache.org/jira/browse/CXF-1387 > Project: CXF > Issue Type: New Feature > Components: Core > Reporter: Ian Roberts > Assignee: Daniel Kulp > Fix For: 2.1.2 > > Attachments: gzip-interceptors-v2.diff, gzip-interceptors.diff > > > This patch contains a pair of interceptors I wrote to provide support for proper GZIP compression of request and response messages. I originally started from the configuration_interceptor sample but the code has evolved quite a long way from there now. > There are two separate interceptors. GZIPInInterceptor looks in the PROTOCOL_HEADERS for a Content-Encoding of "gzip", and if found it wraps the message's InputStream with a GZIPInputStream to uncompress the payload. It restores the original input stream at the end of processing (failure to do that originally left me with lots of stale HTTP connections). > GZIPOutInterceptor applies gzip compression to outgoing messages whose payload is larger than a configurable threshold (default 1kB), and sets their Content-Encoding in the PROTOCOL_HEADERS to "gzip". Smaller messages are not compressed as it's probably not worth the overhead. > As currently written, these interceptors are only for use on the client side (compress the request, uncompress the response). In my services I implement the server-side compression outside of CXF via a servlet filter (http://sourceforge.net/projects/pjl-comp-filter), but if you think it would be useful I can modify the interceptors to support this too - the "in" interceptor should work as-is, the "out" one would have to be made conditional on the Accept-Encoding header supplied in the client request. -- This message is automatically generated by JIRA. - You can reply to this email to add a comment to the issue online.