elfinder-servlet icon indicating copy to clipboard operation
elfinder-servlet copied to clipboard

Concurrent petition overlaps json response object

Open wideawakening opened this issue 12 years ago • 0 comments

HI,

First thanks for the Java connector schema for elFinder, it's a nice work to start with.

We're having some problems with the 'AbstractConnectorServlet' implementation, due to the class scope 'json' variable being used over multiple petitions.

This can be easily tested with the 'reload' command on elFinder (2.0-rc1), because it triggers an 'open' and 'parent' command in parallel while most of the commands are sequential. Don't know if this could be a bug but, however, the problem will also exist on concurrent environments.

To solve this we just have to provide the command's json output object when writing the result.

/ / AbstractConnectorServlet#processRequest
output(response, command.isResponseTextHtml(), command.getJson(), command.getResponseWriter());

After creating

AbstractCommand#getJSON()

wideawakening avatar Aug 17 '12 08:08 wideawakening