From 29454259b7f6d4fb084b1a25414cd235b2b19b49 Mon Sep 17 00:00:00 2001 From: afduarte Date: Tue, 24 May 2016 14:54:05 +0100 Subject: [PATCH] Changing the response for a malformed request when using application/x-www-form-urlencoded to not be misleading towards the current status of the project --- .../jersey/resource/GenericEnhancerUiResource.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/GenericEnhancerUiResource.java b/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/GenericEnhancerUiResource.java index 67046ff6e..b5d9711bc 100644 --- a/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/GenericEnhancerUiResource.java +++ b/enhancer/jersey/src/main/java/org/apache/stanbol/enhancer/jersey/resource/GenericEnhancerUiResource.java @@ -135,11 +135,11 @@ public Response enhanceFromForm(@FormParam("content") String content, // content parameter throw new WebApplicationException( Response.status(Response.Status.UNSUPPORTED_MEDIA_TYPE) - .entity("Parsing Content as 'application/x-www-form-urlencoded' is not supported!" - + "Please directly POST the content and set the 'Content-Type' " - + "header to the media type of the parsed content. 'application/" - + "octet-stream' SHOULD BE used if the media type of the parsed " - + "content is not known.\n") + .entity("Parsing Content as 'application/x-www-form-urlencoded' is not officially supported!" + + "Please directly POST the content or if you do want to use the unsupported API," + + "use the following keys:\n" + + "content => The text to enhance\n" + + "format => Equivalent to the Accept Header\n") .build()); } ContentItem ci = ciFactory.createContentItem(new StringSource(content));