Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2677

MultipartParserDefinition overrides max entity size already set and configured from other sources

XMLWordPrintable

      MultipartParserDefinition.create applies the default MULTIPART_MAX_ENTITY_SIZE in a way that overrides a size already applied from either a listener max-post-size or an application servlet's multipart config.  So larger multipart requests now fail at the 2 mb limit unexpectedly despite other proper settings to allow:

      Caused by: io.undertow.server.RequestTooBigException: UT000020: Connection terminated as request was larger than 2097152
      	at io.undertow.core@2.3.20.SP4-redhat-00001//io.undertow.conduits.FixedLengthStreamSourceConduit.checkMaxSize(FixedLengthStreamSourceConduit.java:173)
      	at io.undertow.core@2.3.20.SP4-redhat-00001//io.undertow.conduits.FixedLengthStreamSourceConduit.read(FixedLengthStreamSourceConduit.java:236)
      	at org.jboss.xnio@3.8.16.Final-redhat-00001//org.xnio.conduits.ConduitStreamSourceChannel.read(ConduitStreamSourceChannel.java:127)
      	at io.undertow.core@2.3.20.SP4-redhat-00001//io.undertow.channels.DetachableStreamSourceChannel.read(DetachableStreamSourceChannel.java:206)
      	at io.undertow.core@2.3.20.SP4-redhat-00001//io.undertow.server.HttpServerExchange$ReadDispatchChannel.read(HttpServerExchange.java:2484)
      	at org.jboss.xnio@3.8.16.Final-redhat-00001//org.xnio.channels.Channels.readBlocking(Channels.java:344)
      	at io.undertow.servlet@2.3.20.SP4-redhat-00001//io.undertow.servlet.spec.ServletInputStreamImpl.readIntoBuffer(ServletInputStreamImpl.java:201)
      	at io.undertow.servlet@2.3.20.SP4-redhat-00001//io.undertow.servlet.spec.ServletInputStreamImpl.read(ServletInputStreamImpl.java:176)
      	at io.undertow.core@2.3.20.SP4-redhat-00001//io.undertow.server.handlers.form.MultiPartParserDefinition$MultiPartUploadHandler.parseBlocking(MultiPartParserDefinition.java:244)
      	at io.undertow.servlet@2.3.20.SP4-redhat-00001//io.undertow.servlet.spec.HttpServletRequestImpl.parseFormData(HttpServletRequestImpl.java:878) 

              ropalka Richard Opalka
              rhn-support-aogburn Aaron Ogburn
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

                Created:
                Updated:
                Resolved: