This pull request stops the download and returns an error message if the web resource exceeds the maximum size, arbitrarily set to 1MB. This will effectively stop the download if it's taking too much time. Furthermore, currently, it is possible to exhaust the memory on the system by launching the download of a large file; this pull request prevents it.
However, tests are now taking a lot more time (~24s). We would need a mock to reduce the execution time. I don't think it is a pressing issue right now as few people are developing on this and it is always possible to disable the test temporarily.
This pull request stops the download and returns an error message if the web resource exceeds the maximum size, arbitrarily set to 1MB. This will effectively stop the download if it's taking too much time. Furthermore, currently, it is possible to exhaust the memory on the system by launching the download of a large file; this pull request prevents it.
However, tests are now taking a lot more time (~24s). We would need a mock to reduce the execution time. I don't think it is a pressing issue right now as few people are developing on this and it is always possible to disable the test temporarily.