Issue #5285 - Using Status code 415 Unsupported Media Type instead.

Signed-off-by: Joakim Erdfelt <joakim.erdfelt@gmail.com>
This commit is contained in:
Joakim Erdfelt 2020-09-16 15:39:43 -05:00
parent ba22c08fde
commit 844f134d21
No known key found for this signature in database
GPG Key ID: 2D0E1FB8FE4B68B4
1 changed files with 2 additions and 2 deletions

View File

@ -516,7 +516,7 @@ public class Request implements HttpServletRequest
{
String contentEncoding = getHttpFields().get(HttpHeader.CONTENT_ENCODING);
if (contentEncoding != null && !HttpHeaderValue.IDENTITY.is(contentEncoding))
throw new BadMessageException(HttpStatus.NOT_IMPLEMENTED_501, "Unsupported Content-Encoding");
throw new BadMessageException(HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, "Unsupported Content-Encoding");
}
extractFormParameters(_contentParameters);
}
@ -527,7 +527,7 @@ public class Request implements HttpServletRequest
try
{
if (_metaData != null && getHttpFields().contains(HttpHeader.CONTENT_ENCODING))
throw new BadMessageException(HttpStatus.NOT_IMPLEMENTED_501, "Unsupported Content-Encoding");
throw new BadMessageException(HttpStatus.UNSUPPORTED_MEDIA_TYPE_415, "Unsupported Content-Encoding");
getParts(_contentParameters);
}
catch (IOException e)