Class ContentLengthAwareCommonsMultipartResolver

  • All Implemented Interfaces:
    org.springframework.beans.factory.Aware, org.springframework.web.context.ServletContextAware, org.springframework.web.multipart.MultipartResolver

    public class ContentLengthAwareCommonsMultipartResolver
    extends org.springframework.web.multipart.commons.CommonsMultipartResolver
    Safari includes the multipart packet inside an HTTP redirect without the Content-Length header. This causes CommonsMultipartResolver to blow up. We extend it here to catch this exception, printing a warning.
    Since:
    1.0
    • Nested Class Summary

      • Nested classes/interfaces inherited from class org.springframework.web.multipart.commons.CommonsFileUploadSupport

        org.springframework.web.multipart.commons.CommonsFileUploadSupport.MultipartParsingResult
    • Field Summary

      • Fields inherited from class org.springframework.web.multipart.commons.CommonsFileUploadSupport

        logger
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      protected org.springframework.web.multipart.commons.CommonsFileUploadSupport.MultipartParsingResult parseRequest​(javax.servlet.http.HttpServletRequest request)  
      • Methods inherited from class org.springframework.web.multipart.commons.CommonsMultipartResolver

        cleanupMultipart, determineEncoding, isMultipart, newFileUpload, resolveMultipart, setResolveLazily, setServletContext, setSupportedMethods
      • Methods inherited from class org.springframework.web.multipart.commons.CommonsFileUploadSupport

        cleanupFileItems, createMultipartFile, getDefaultEncoding, getFileItemFactory, getFileUpload, isUploadTempDirSpecified, newFileItemFactory, parseFileItems, prepareFileUpload, setDefaultEncoding, setMaxInMemorySize, setMaxUploadSize, setMaxUploadSizePerFile, setPreserveFilename, setUploadTempDir
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ContentLengthAwareCommonsMultipartResolver

        public ContentLengthAwareCommonsMultipartResolver()
    • Method Detail

      • parseRequest

        protected org.springframework.web.multipart.commons.CommonsFileUploadSupport.MultipartParsingResult parseRequest​(javax.servlet.http.HttpServletRequest request)
                                                                                                                  throws org.springframework.web.multipart.MultipartException
        Overrides:
        parseRequest in class org.springframework.web.multipart.commons.CommonsMultipartResolver
        Throws:
        org.springframework.web.multipart.MultipartException