cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [1/2] cxf git commit: Skipping reading the form body if it is empty
Date Tue, 17 Nov 2015 16:11:42 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 08f2cfcf8 -> e492a2227


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/2653e886
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2653e886
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2653e886

Branch: refs/heads/master
Commit: 2653e88603fcc690dad279f362a9bf4daf7706bd
Parents: 7f4b3b1
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:11:00 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/2653e886/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 666fa28..ec5d0e0 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
@@ -126,6 +126,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