cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Skipping reading the form body if it is empty
Date Tue, 17 Nov 2015 16:47:50 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.0.x-fixes 1cf2c8144 -> b7f9fdea0


Skipping reading the form body if it is empty


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

Branch: refs/heads/3.0.x-fixes
Commit: b7f9fdea06504b478a2d504e9accd00ef6a0a380
Parents: 1cf2c81
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Tue Nov 17 16:11:00 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Tue Nov 17 16:47:36 2015 +0000

----------------------------------------------------------------------
 .../jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java | 3 +++
 1 file changed, 3 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/b7f9fdea/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
----------------------------------------------------------------------
diff --git a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
index afee3bc..91db3f9 100644
--- a/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
+++ b/rt/frontend/jaxrs/src/main/java/org/apache/cxf/jaxrs/utils/FormUtils.java
@@ -125,6 +125,9 @@ public final class FormUtils {
                                              String postBody, 
                                              String enc,
                                              boolean decode) {
+        if (StringUtils.isEmpty(postBody)) {
+            return;
+        }
         List<String> parts = Arrays.asList(StringUtils.split(postBody, "&"));
         checkNumberOfParts(m, parts.size());
         for (String part : parts) {


Mime
View raw message