MapStore2
MapStore2 copied to clipboard
Implement fix for WPS exports fail for all file formats except CSV - GeoServer
As per THIS comment, we need full cloning of the HttpServelt request.
Meeting minutes:
- Looks like the full fix will require deep cloning of the HTTP HttpServletRequest request while we pass it to the Dispatcher.REQUEST.
- This is not specific to this issue, having a deep clone will avoid this type of strange issue in the future.
- As @aaime says deep cloning that object is not going to be easy, it needs to be efficient and clone all attributes recursively.
- @taba90 will think about an approach to handle this situation and check the plan with @aaime. We will time box this plan | estimate to 2 hours.
This is the plan as dicussed and suggested by Andrea:
- we are not going to do a deep copy of the whole HttpServletRequest, but only of the parameters.
- the copy should be performed everytime a threadpool is at stake. As suggested to be sure we intercept all the scenario we can use a ThreadLocalTransfer
- Currently we have one of them handling the ThreadLocal holding the Dispatcher Request. It is a singleton bean defined here and use a generic mechanism based on reflection to do so.
- The suggested approach is thus to use RequestWrapper that internally will do a copy of the request parameters like this wrapper but taking care of deep copying them instead of doing a shallow one, and passing the parameters to an internal map that will be used in the wrapper method accessing the parameters.
- The wrapper will be instantiated during the handling of the Dispatcher Request Thread local transfer. A new ThreadLocalTransfer implementation will thus handle this and will replace the type of the one currently defined for the DispatcherRequest
@nmco @taba90 The plan and estimation looks good to me
Start working on that
@nmco any news on this? The epic connected to this issue has been closed, saying that a fix was applied. But it's not clear to me if, where and what.
Is this a duplicate of https://github.com/geosolutions-it/mapstore2/issues/8053 ?
@Fausto did some work on this @taba90, we need to understand what exactly, I think it was the workaround and now we miss the correct fix.