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

Forwarded multipart requests may lose submitted form parameters

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 1.1.Beta2
    • 1.1.Beta1
    • Servlet
    • None

      If a multipart requests is forwarded (from a filter or a non multipart capable servlet) to a multipart capable servlet, the request parameter map will be empty.

      I think the cause for this is the following:

      At some point in time HttpServletRequestImpl.parseFormData() is called. Undertow now asks the ManagedServlet for the FormParserFactory. It looks like in the scenario described above Undertow isn't using a multipart capable FormParserFactory and therefore the parameters sent with the multipart form won't be parsed correctly. I'm not completely sure if it would work correctly if HttpServletRequestImpl.parseFormData() is called AFTER the forward to the multipart capable servlet.

      I'll send a pull request containing a failing test case in a few minutes.

              sdouglas1@redhat.com Stuart Douglas (Inactive)
              christian@kaltepoth.de Christian Kaltepoth (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: