#2109 closed defect (fixed)

Refactor RequestWrapper for Servlet 3.0 API

Reported by: zzz Owned by: zzz
Priority: minor Milestone: 0.9.33
Component: apps/jetty Version: 0.9.32
Keywords: Cc: str4d
Parent Tickets:


and MultiPartRequest? and related utility classes from jetty-i2p.jar.

These were brought over from Jetty 6 when we moved to 7, as it was too hard to migrate to MultiPartFilter?. But as it says in current Jetty documentation http://download.eclipse.org/jetty/9.2.21.v20170120/apidocs/org/eclipse/jetty/servlets/MultiPartFilter.html we don't need anything from Jetty as it's supported in the Servlet 3.0 API. We got there in 0.9.30 when we moved to Servlet 3.1, Tomcat 8 and Jetty 9. See getParts() on https://docs.oracle.com/javaee/7/api/javax/servlet/http/HttpServletRequest.html

It does not appear that it's used by any plugins. In our code, current users are susimail WebMail?, console FormHandler?, and subclassed handlers for configclients, configfamily, and configreseed.

This may also help with OOMs we've seen with large POSTs or plugin installs. Looks like the new interface enables a better implementation including use of temp files.


Change History (5)

comment:1 Changed 18 months ago by zzz

  • Status changed from new to open

Deprecated in ba85e6b963df144ba87e03884ce26783d2cbfc54 to be 0.9.32-13

comment:2 Changed 18 months ago by zzz

We will need annotations for susimail and web.xml config for the console https://stackoverflow.com/questions/19145489/multipartconfig-override-in-web-xml to set the parameters.
The annotation class is bundled in javax.servlet.jar.

comment:3 Changed 18 months ago by zzz

  • Cc str4d added

adding cc str4d, this ticket does not directly affect bote, but it can similarly migrate from the implemented MultipartFilter? to the Servlet 3.0 API.

comment:4 Changed 18 months ago by zzz

  • Milestone changed from 0.9.34 to 0.9.33
  • Owner set to zzz
  • Status changed from open to accepted
  • Summary changed from Deprecate and remove RequestWrapper to Refactor RequestWrapper for Servlet 3.0 API

On further review, the correct plan is to keep RequestWrapper? and refactor it to use the 3.0 API. The old MultiPartRequest? code will still be deleted. This will eliminate the need for any changes in SusiMail? and console, other than setting the MultipartConfig?. Changing the summary text.

comment:5 Changed 18 months ago by zzz

  • Component changed from apps/susimail to apps/jetty
  • Resolution set to fixed
  • Status changed from accepted to closed

Comment 4 plan implemented in 6bb4b81cd7d10a72381430bf5f932aa845361edf to be 0.9.32-13.
Note that the annotation doesn't work, have to add the params to web.xml.

Note: See TracTickets for help on using tickets.