cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject svn commit: r1382158 - in /cxf/branches/2.4.x-fixes: ./ rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
Date Fri, 07 Sep 2012 20:25:52 GMT
Author: sergeyb
Date: Fri Sep  7 20:25:51 2012
New Revision: 1382158

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

................
  r1382150 | sergeyb | 2012-09-07 21:13:04 +0100 (Fri, 07 Sep 2012) | 16 lines
  
  Merged revisions 1382142 via svnmerge from 
  https://svn.apache.org/repos/asf/cxf/branches/2.6.x-fixes
  
  ................
    r1382142 | sergeyb | 2012-09-07 21:00:54 +0100 (Fri, 07 Sep 2012) | 9 lines
    
    Merged revisions 1381672 via svnmerge from 
    https://svn.apache.org/repos/asf/cxf/trunk
    
    ........
      r1381672 | sergeyb | 2012-09-06 17:39:45 +0100 (Thu, 06 Sep 2012) | 1 line
      
      [CXF-4499] Properly encoding not only form keys but values too
    ........
  ................
................

Modified:
    cxf/branches/2.4.x-fixes/   (props changed)
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
    cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java

Propchange: cxf/branches/2.4.x-fixes/
------------------------------------------------------------------------------
  Merged /cxf/branches/2.5.x-fixes:r1382150
  Merged /cxf/trunk:r1381672
  Merged /cxf/branches/2.6.x-fixes:r1382142

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

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java?rev=1382158&r1=1382157&r2=1382158&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
Fri Sep  7 20:25:51 2012
@@ -131,7 +131,7 @@ public final class FormUtils {
                 String value = entryIterator.next();
                 os.write(entry.getKey().getBytes(enc));
                 os.write('=');
-                String data = encoded ? value : HttpUtils.urlEncode(value);
+                String data = encoded ? value : HttpUtils.urlEncode(value, enc);
                 os.write(data.getBytes(enc));
                 if (entryIterator.hasNext() || it.hasNext()) {
                     os.write('&');

Modified: cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
URL: http://svn.apache.org/viewvc/cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java?rev=1382158&r1=1382157&r2=1382158&view=diff
==============================================================================
--- cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
(original)
+++ cxf/branches/2.4.x-fixes/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/HttpUtils.java
Fri Sep  7 20:25:51 2012
@@ -117,10 +117,15 @@ public final class HttpUtils {
     
     public static String urlEncode(String value) {
         
+        return urlEncode(value, "UTF-8");
+    }
+    
+    public static String urlEncode(String value, String enc) {
+        
         try {
-            value = URLEncoder.encode(value, "UTF-8");
+            value = URLEncoder.encode(value, enc);
         } catch (UnsupportedEncodingException ex) {
-            // unlikely to happen
+            throw new RuntimeException(ex);
         }
         
         return value;



Mime
View raw message