PASTAplus / PASTA

Repository for the Provenance Aware Synthesis Tracking Architecture (PASTA) project.
12 stars 3 forks source link

Filenames in content-disposition headers should be quoted to avoid parsing errors #125

Closed servilla closed 10 months ago

servilla commented 10 months ago

Chrome no longer supports file names that contain whitespace or commas when in a content-disposition header field. This is now causing errors during downloads of data when data file names are not quoted:

http --header  "https://pasta.lternet.edu/package/data/eml/knb-lter-cdr/513/9/8d4c18cbb54d7e44838ab45e395ee241"
HTTP/1.1 200 OK
Access-Control-Allow-Origin: *
Connection: keep-alive
Content-Length: 47191
Content-Type: text/csv
Date: Thu, 07 Dec 2023 19:25:04 GMT
Server: nginx/1.18.0 (Ubuntu)
content-disposition: attachment; filename=e267_Survey results. Leaf disposal choices between, remove from site, mulch, compost, burn.txt
web-service: DataPackageManager-1.0

results in the following error in Chrome (Version 120.0.6099.62 (Official Build) (64-bit)):

ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION