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:46:32 GMT
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 <sberyozkin@gmail.com>
Authored: Tue Nov 17 16:11:00 2015 +0000
Committer: Sergey Beryozkin <sberyozkin@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) {


Mime
View raw message