#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: Sensitive: no

Description

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.

Subtickets

Change History (5)

comment:1 Changed 21 months ago by zzz

Status: newopen

Deprecated in ba85e6b963df144ba87e03884ce26783d2cbfc54 to be 0.9.32-13

comment:2 Changed 21 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 21 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 21 months ago by zzz

Milestone: 0.9.340.9.33
Owner: set to zzz
Status: openaccepted
Summary: Deprecate and remove RequestWrapperRefactor 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 21 months ago by zzz

Component: apps/susimailapps/jetty
Resolution: fixed
Status: acceptedclosed

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.