-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove directory from disposition header (#3515)
PBENCH-1240 Now that the dashboard supports download of tarball inventory, I observed that the generated filename included a dataset-name prefix. This is because the content disposition header allows only a name, not a path, and the browser is trying to be "helpful" by converting the `<dataset-name>/<filename>` string, replacing the disallowed `/` with `_`. The result is ugly and unexpected. NOTE: although the Mozilla guidelines try to suggest that the filename must be enclosed in quotes, this conflicts with the RFC, and Werkzeug's `send_file` is "reluctant" to include quotes (plus it's ugly to construct). Therefore, this doesn't attempt to insert the (presumably unnecessary) quotes. (And note also that, despite the ugly name, the current TOC download works without a quoted filename in Chrome.) Instead, report only the name of the file. Add unit and functional test validation.
- Loading branch information
Showing
3 changed files
with
29 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters