Overall +1 but in the meantime what's the option, not using req.getReader? Romain Manni-Bucau @rmannibucau <https://twitter.com/rmannibucau> | Blog <https://rmannibucau.metawerx.net/> | Old Blog <http://rmannibucau.wordpress.com> | Github <https://github.com/rmannibucau> | LinkedIn <https://www.linkedin.com/in/rmannibucau> | Book <https://www.packtpub.com/application-development/java-ee-8-high-performance>
Le lun. 3 avr. 2023 à 20:51, Mark Thomas <ma...@apache.org> a écrit : > On 02/04/2023 18:23, Romain Manni-Bucau wrote: > > Hi all, > > > > Wonder if tomcat couldn't get ReadListener support for > request.getReader(), > > I know it is not in servlet spec but it is weirdish to have a high level > > API less usable than the low level one because it lacks features. > > Since CoyoteReader uses the same input than the servlet inputstream > > (inputbuffer) it would just be a matter of enabling to forward the > > setReadListener. > > Now, on an API standpoint and for me, it makes more sense to do it on the > > servlet request since it gives callbacks of the request more than on a > > particular input impl so it can be a better option. > > I'm not sure if RequestFacade would be casted as such or if some Unwrap > API > > can help but it would really help to promote this API without enforcing > > InputStream usage which can make the code not respecting the encoding > quite > > easily - or enforce to duplicate servlet logic and its optimizations. > > > > Wdyt? > > I think I'd rather see changes like this come via the Servlet spec > rather than add Tomcat specific API for something as fundamental as > reading the request body. > > Mark > > --------------------------------------------------------------------- > To unsubscribe, e-mail: dev-unsubscr...@tomcat.apache.org > For additional commands, e-mail: dev-h...@tomcat.apache.org > >