cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ff...@apache.org
Subject svn commit: r1294021 - in /cxf/branches/2.4.x-fixes: ./ rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
Date Mon, 27 Feb 2012 04:07:37 GMT
Author: ffang
Date: Mon Feb 27 04:07:37 2012
New Revision: 1294021

URL: http://svn.apache.org/viewvc?rev=1294021&view=rev
Log:
Merged revisions 1294018 via svnmerge from 
https://svn.apache.org/repos/asf/cxf/branches/2.5.x-fixes

........
  r1294018 | ffang | 2012-02-27 12:01:40 +0800 (δΈ€, 27  2 2012) | 1 line
  
  [CXF-4134]also add and reuse a ENCODINGS pattern
........

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
Binary property 'svnmerge-integrated' - no diff available.

Modified: cxf/branches/2.4.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java?rev=1294021&r1=1294020&r2=1294021&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/transports/common/src/main/java/org/apache/cxf/transport/common/gzip/GZIPOutInterceptor.java
Mon Feb 27 04:07:37 2012
@@ -76,6 +76,11 @@ public class GZIPOutInterceptor extends 
     public static final Pattern ZERO_Q = Pattern.compile(";\\s*q=0(?:\\.0+)?$");
 
     /**
+     * regular expression which can split encodings
+     */
+    public static final Pattern ENCODINGS = Pattern.compile("[,\\s]*,\\s*");
+
+    /**
      * Key under which we store the original output stream on the message, for
      * use by the ending interceptor.
      */
@@ -195,7 +200,7 @@ public class GZIPOutInterceptor extends 
                     List<String> nonZeros = new ArrayList<String>(3);
 
                     for (String headerLine : acceptEncodingHeader) {
-                        String[] encodings = headerLine.trim().split("[,\\s]*,\\s*");
+                        String[] encodings = ENCODINGS.split(headerLine.trim());
 
                         for (String enc : encodings) {
                             Matcher m = ZERO_Q.matcher(enc);



Mime
View raw message