On Fri, Sep 15, 2023 at 8:43 AM Rémy Maucherat <r...@apache.org> wrote:

> On Fri, Sep 15, 2023 at 2:38 PM Mark Thomas <ma...@apache.org> wrote:
> >
> > All,
> >
> > Since the introduction of multi-part upload support in Servlet 3 (Tomcat
> > 7), Tomcat has used a package renamed fork of Commons FileUpload to
> > provide that support.
> >
> > Recently, FileUpload has undergone some major refactoring for 2.x to
> > modularise it to support different versions of the Servlet
> > specification, primarily Java EE vs Jakarta EE. As part of that, the
> > minimum Java version for 2.x is Java 11.
> >
> > The code Tomcat is currently based on is now the essentially 1.x branch.
> > This was created from the 1.4 release so Tomcat currently has a few
> > changes that were not applied to that branch. The minimum Java version
> > for this branch is Java 6.
> >
> > I have spent the last couple of hours looking at updating Tomcat 11.0.x
> > to the 2.x FileUpload code. It is doable, but we'll need to bring in
> > most of Commons IO as well which is about another 500k.
> >
> > Given the minimum Java version requirements, Tomcat 8.5.x and 9.0.x will
> > need to remain based on FileUpload 1.x.
> >
> > Tomcat 10.1.x and Tomcat 11.0.x could opt to remain based on FileUpload
> > 1.x or switch to 2.x.
> >
> > We need to decide what to do.
> >
> > Since we have little choice for Tomcat 8.5.x and 9.0.x, I will be
> > aligning these branches with FileUpload 1.x first.
> >
> > I'm not a huge fan of pulling a large chunk of Commons IO or on making
> > sufficient changes to our fork so we don't have to. I am therefore
> > currently planning on aligning 10.1.x and 11.0.x with FileUpload 1.x as
> > well.
> >
> > I do intend to see if there are changes from FileUpload 2.x that are
> > worth cherry-picking into Tomcat (and FileUpload 1.x) if minimum Java
> > versions permit.
> >
> > All that said, the Jakarta EE Migration tool already includes a package
> > renamed copy of Commons IO (as well as Lang and Compress) so there might
> > be something we co do there - maybe a new Commons forks JAR?
> >
> > Thoughts?
>
> +1 on staying with fileupload 1.x for all branches then, for the time
> being. 11 could move to 2.x eventually it seems.
>

+1

Reply via email to