theia
theia copied to clipboard
File download sets global limit settings
Bug Description:
the file-system package download backend application is setting the default global limit for json, so other backend applications cannot set limits for their own routes
Steps to Reproduce:
- Create a backend application with a json route
- Set the limit to more than 100KB
- Limit will be 100KB no matter what
Additional Information
- Operating System: ubuntu
- Theia Version: 1.29.0
The problem appears to be here: https://github.com/eclipse-theia/theia/blob/da356b537037680cdc7283a695ebfbf0c00d2cf1/packages/filesystem/src/node/download/file-download-endpoint.ts#L50
if it is changed to app.use(FileDownloadEndpoint.PATH, json()); then it will narrow the route that the default limit applies to and won't apply globally.
Hey @syncharny,
thanks for making us aware of that. Are you interested in providing a fix for that?
Hi, yes I'm interested in fixing it. Still going though the contributor docs.