Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove directory from disposition header #3515

Merged
merged 1 commit into from
Aug 7, 2023

Commits on Aug 7, 2023

  1. Remove directory from disposition header

    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.
    dbutenhof committed Aug 7, 2023
    Configuration menu
    Copy the full SHA
    f6ba86b View commit details
    Browse the repository at this point in the history