Return-Path: Delivered-To: apmail-cxf-issues-archive@www.apache.org Received: (qmail 4623 invoked from network); 18 Jul 2008 20:53:53 -0000 Received: from hermes.apache.org (HELO mail.apache.org) (140.211.11.2) by minotaur.apache.org with SMTP; 18 Jul 2008 20:53:53 -0000 Received: (qmail 22685 invoked by uid 500); 18 Jul 2008 20:53:52 -0000 Delivered-To: apmail-cxf-issues-archive@cxf.apache.org Received: (qmail 22662 invoked by uid 500); 18 Jul 2008 20:53: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 22651 invoked by uid 99); 18 Jul 2008 20:53:52 -0000 Received: from athena.apache.org (HELO athena.apache.org) (140.211.11.136) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 18 Jul 2008 13:53: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; Fri, 18 Jul 2008 20:53:07 +0000 Received: from brutus (localhost [127.0.0.1]) by brutus.apache.org (Postfix) with ESMTP id B4241234C179 for ; Fri, 18 Jul 2008 13:53:31 -0700 (PDT) Message-ID: <175152190.1216414411736.JavaMail.jira@brutus> Date: Fri, 18 Jul 2008 13:53:31 -0700 (PDT) From: "Daniel Kulp (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=12614869#action_12614869 ] Daniel Kulp commented on CXF-1387: ---------------------------------- This is really nicely done. I'm not sure how we missed this back in January. Sorry about that. I'm definitely going to get this applied. > 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 > 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.