distributed-system-analysis / pbench

A benchmarking and performance analysis framework
http://distributed-system-analysis.github.io/pbench/
GNU General Public License v3.0
188 stars 108 forks source link

Touch up Content-Disposition header #3439

Closed dbutenhof closed 1 year ago

dbutenhof commented 1 year ago

PBENCH-1169

Help clients with the output of GET /datasets/<id>/inventory/ by "tuning" the Content-Disposition header automatically generated by Werkzeug's send_file API.

I started thinking I would construct the header and looking into how to add headers to the Response object constructed by send_file. It actually does a good job of guessing the filename, but I decided to help it by providing the name we want, and I'm designating the raw tarfile as an attachment that we can't reasonably expect a client (especially the UI) to do anything with "inline" (the default).