Return-Path: X-Original-To: apmail-cxf-commits-archive@www.apache.org Delivered-To: apmail-cxf-commits-archive@www.apache.org Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by minotaur.apache.org (Postfix) with SMTP id 4CF22185E4 for ; Tue, 17 Nov 2015 16:11:42 +0000 (UTC) Received: (qmail 4802 invoked by uid 500); 17 Nov 2015 16:11:42 -0000 Delivered-To: apmail-cxf-commits-archive@cxf.apache.org Received: (qmail 4728 invoked by uid 500); 17 Nov 2015 16:11:42 -0000 Mailing-List: contact commits-help@cxf.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@cxf.apache.org Delivered-To: mailing list commits@cxf.apache.org Received: (qmail 4715 invoked by uid 99); 17 Nov 2015 16:11:42 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 17 Nov 2015 16:11:42 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id 0A550DFF87; Tue, 17 Nov 2015 16:11:42 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: sergeyb@apache.org To: commits@cxf.apache.org Date: Tue, 17 Nov 2015 16:11:42 -0000 Message-Id: X-Mailer: ASF-Git Admin Mailer Subject: [1/2] cxf git commit: Skipping reading the form body if it is empty 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 Authored: Tue Nov 17 16:11:00 2015 +0000 Committer: Sergey Beryozkin 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 parts = Arrays.asList(StringUtils.split(postBody, "&")); checkNumberOfParts(m, parts.size()); for (String part : parts) {