From 1234f1a1cfe5004d6cf662222d87ce8a8ca79a46 Mon Sep 17 00:00:00 2001 From: gmantele <gmantele@ari.uni-heidelberg.de> Date: Fri, 31 Jul 2015 18:26:31 +0200 Subject: [PATCH] [UWS,TAP] Fix parameters parsing in UWS (or Async in TAP): when the content-type was not exactly 'application/x-www-form-urlencoded' for normal POST requests, no parameter was read by the UWS/TAP library. This content-type test has now been modified from a strict equality to a startsWith test. (Note: This bug only concerned the form encoded requests, not the multipart ones) --- src/uws/service/request/FormEncodedParser.java | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/uws/service/request/FormEncodedParser.java b/src/uws/service/request/FormEncodedParser.java index d9882d3..b1943cc 100644 --- a/src/uws/service/request/FormEncodedParser.java +++ b/src/uws/service/request/FormEncodedParser.java @@ -16,7 +16,7 @@ package uws.service.request; * You should have received a copy of the GNU Lesser General Public License * along with UWSLibrary. If not, see <http://www.gnu.org/licenses/>. * - * Copyright 2014 - Astronomisches Rechen Institut (ARI) + * Copyright 2014-2015 - Astronomisches Rechen Institut (ARI) */ import java.io.BufferedInputStream; @@ -51,7 +51,7 @@ import uws.UWSException; * </i></p> * * @author Grégory Mantelet (ARI) - * @version 4.1 (11/2014) + * @version 4.2 (07/2015) * @since 4.1 */ public class FormEncodedParser implements RequestParser { @@ -169,7 +169,7 @@ public class FormEncodedParser implements RequestParser { String contentType = request.getContentType(); if (contentType == null) return false; - else if (contentType.toLowerCase().equals(EXPECTED_CONTENT_TYPE)) + else if (contentType.toLowerCase().startsWith(EXPECTED_CONTENT_TYPE)) return true; else return false; -- GitLab