Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,9 @@ private static void checkNumberOfParts(Message m, int numberOfParts) {
}

public static boolean isFormPostRequest(Message m) {
return MediaType.APPLICATION_FORM_URLENCODED.equals(m.get(Message.CONTENT_TYPE))
String contentType = (String) m.get(Message.CONTENT_TYPE);
return contentType != null
&& contentType.startsWith(MediaType.APPLICATION_FORM_URLENCODED)
&& HttpMethod.POST.equals(m.get(Message.HTTP_REQUEST_METHOD));
}
}