Skip to content
Snippets Groups Projects
Commit 1234f1a1 authored by gmantele's avatar gmantele
Browse files

[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)
parent 118cd72b
No related branches found
No related tags found
No related merge requests found
...@@ -16,7 +16,7 @@ package uws.service.request; ...@@ -16,7 +16,7 @@ package uws.service.request;
* You should have received a copy of the GNU Lesser General Public License * You should have received a copy of the GNU Lesser General Public License
* along with UWSLibrary. If not, see <http://www.gnu.org/licenses/>. * 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; import java.io.BufferedInputStream;
...@@ -51,7 +51,7 @@ import uws.UWSException; ...@@ -51,7 +51,7 @@ import uws.UWSException;
* </i></p> * </i></p>
* *
* @author Gr&eacute;gory Mantelet (ARI) * @author Gr&eacute;gory Mantelet (ARI)
* @version 4.1 (11/2014) * @version 4.2 (07/2015)
* @since 4.1 * @since 4.1
*/ */
public class FormEncodedParser implements RequestParser { public class FormEncodedParser implements RequestParser {
...@@ -169,7 +169,7 @@ public class FormEncodedParser implements RequestParser { ...@@ -169,7 +169,7 @@ public class FormEncodedParser implements RequestParser {
String contentType = request.getContentType(); String contentType = request.getContentType();
if (contentType == null) if (contentType == null)
return false; return false;
else if (contentType.toLowerCase().equals(EXPECTED_CONTENT_TYPE)) else if (contentType.toLowerCase().startsWith(EXPECTED_CONTENT_TYPE))
return true; return true;
else else
return false; return false;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment