Skip to content

Commit 2f87ada

Browse files
committedDec 19, 2019
Replace an Exception thrown with BAD_REQUEST
Signed-off-by: Jan Supol <jan.supol@oracle.com>
1 parent af5d00a commit 2f87ada

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed
 

‎containers/jersey-servlet-core/src/main/java/org/glassfish/jersey/servlet/ServletContainer.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -294,8 +294,9 @@ protected void service(final HttpServletRequest request, final HttpServletRespon
294294
UriComponent.Type.PATH);
295295

296296
if (!decodedBasePath.equals(encodedBasePath)) {
297-
throw new ProcessingException("The servlet context path and/or the "
298-
+ "servlet path contain characters that are percent encoded");
297+
setResponseForInvalidUri(response, new ProcessingException("The servlet context path and/or the "
298+
+ "servlet path contain characters that are percent encoded"));
299+
return;
299300
}
300301

301302
final URI baseUri;

0 commit comments

Comments
 (0)