You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2015/11/17 17:46:32 UTC

cxf git commit: Skipping reading the form body if it is empty

Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 13184062c -> 5bd827c15


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

Branch: refs/heads/3.1.x-fixes
Commit: 5bd827c15cf810a43c91f4476ff74e47f51dd049
Parents: 1318406
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Tue Nov 17 16:11:00 2015 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Tue Nov 17 16:46:16 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/5bd827c1/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) {