Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bug fix kimchi-project#189: Forcing download of user log file
The error in staticfile() happens when the browser tries to open a recently created file in a separated tab/window but this file isn't declared in the cherry-py config with tools.staticfile.on, like '/favicon.ico' for example. A suitable solution to avoid the error is to force the browser to download the file instead of opening it. According to the Cherry-py docs: "Using "application/x-download" response content-type, you can tell a browser that a resource should be downloaded onto the user’s machine rather than displayed." This patch set the application type of all '.txt' files created under the /data/logs dir as 'application/x-download'. Signed-off-by: Daniel Henrique Barboza <[email protected]>
- Loading branch information