@ -121,9 +124,17 @@ public class MockMultipartHttpServletRequest extends MockHttpServletRequest impl
@@ -121,9 +124,17 @@ public class MockMultipartHttpServletRequest extends MockHttpServletRequest impl
if(file!=null){
returnfile.getContentType();
}
else{
returnnull;
try{
Partpart=getPart(paramOrFileName);
if(part!=null){
returnpart.getContentType();
}
}catch(ServletException|IOExceptione){
thrownewIllegalStateException("Cannot extract content type from multipart request.",e);