cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Making GZIPOutInterceptor gzipPermitted method static
Date Sun, 23 Nov 2014 17:37:49 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 24ac267d6 -> 5055d4ccb


Making GZIPOutInterceptor gzipPermitted method static


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/5055d4cc
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5055d4cc
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5055d4cc

Branch: refs/heads/master
Commit: 5055d4ccbd5473bf047ddc2f900bd2f8bf7c5fac
Parents: 24ac267
Author: Sergey Beryozkin <sberyozkin@talend.com>
Authored: Sun Nov 23 17:37:16 2014 +0000
Committer: Sergey Beryozkin <sberyozkin@talend.com>
Committed: Sun Nov 23 17:37:16 2014 +0000

----------------------------------------------------------------------
 .../apache/cxf/transport/common/gzip/GZIPOutInterceptor.java  | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/5055d4cc/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
b/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
index 6041df3..dbce1c3 100644
--- a/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
@@ -40,6 +40,7 @@ import org.apache.cxf.interceptor.MessageSenderInterceptor;
 import org.apache.cxf.io.AbstractThresholdOutputStream;
 import org.apache.cxf.message.Exchange;
 import org.apache.cxf.message.Message;
+import org.apache.cxf.message.MessageUtils;
 import org.apache.cxf.phase.AbstractPhaseInterceptor;
 import org.apache.cxf.phase.Phase;
 
@@ -131,7 +132,7 @@ public class GZIPOutInterceptor extends AbstractPhaseInterceptor<Message>
{
     }
 
     public void handleMessage(Message message) throws Fault {
-        UseGzip use = gzipPermitted(message);
+        UseGzip use = gzipPermitted(message, force);
         if (use != UseGzip.NO) {
             // remember the original output stream, we will write compressed
             // data to this later
@@ -166,9 +167,9 @@ public class GZIPOutInterceptor extends AbstractPhaseInterceptor<Message>
{
      * @throws Fault if the Accept-Encoding header does not allow any encoding
      *                 that we can support (identity, gzip or x-gzip).
      */
-    private UseGzip gzipPermitted(Message message) throws Fault {
+    public static UseGzip gzipPermitted(Message message, boolean force) throws Fault {
         UseGzip permitted = UseGzip.NO;
-        if (isRequestor(message)) {
+        if (MessageUtils.isRequestor(message)) {
             LOG.fine("Requestor role, so gzip enabled");
             Object o = message.getContextualProperty(USE_GZIP_KEY);
             if (o instanceof UseGzip) {


Mime
View raw message