Merge pull request #5195 from suem/bugfix_FilterSessionStore

NullPointerException in FilterSessionStore when restoring request
This commit is contained in:
Pedro Igor 2018-06-01 10:51:28 -03:00 committed by GitHub
commit bc665fdbc3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -111,8 +111,7 @@ public class FilterSessionStore implements AdapterSessionStore {
if (body == null) return new MultivaluedHashMap<String, String>();
String contentType = getContentType();
contentType = contentType.toLowerCase();
if (contentType.startsWith("application/x-www-form-urlencoded")) {
if (contentType != null && contentType.toLowerCase().startsWith("application/x-www-form-urlencoded")) {
ByteArrayInputStream is = new ByteArrayInputStream(body);
try {
parameters = parseForm(is);