Another small but mighty release, with some bugfixes and some QoL improvements, as well as a number of new tests.
The main contribution fixes a long-standing design issue with file handling. Now files/multipart uploads are backed by resourcet temporary files and guarded by wai-extra payload size checks, which hopefully makes it harder to DoS your server .
Please refer to the changelog for full details. Happy hacking!
I wonder if it is possible/desirable to put the entire request handling into a ResourceT block, so temporary resources may be allocated while preparing the response, but freed after the response is served.
For example, using withTemporaryDir with Scotty.file reponse will raise file not found exception since the file name escapes the tmp bracket.
Iām not sure I got the full picture. If you have a sketch solution in mind, could you please open a ticket in the scotty repo, together with a description of your scenario ? Thanks!