Bug #7084
closedMetacat creates an Invalid Content-Disposition value for some filenames
0%
Description
Related to #2566, Metacat is now creating Content-Disposition
HTTP headers with filenames either found in an objects' SystemMetadata, or constructing one from the identifier in it's absence. We've run into a minor issue when the stated filename in the SystemMetadata contains commas. For example, with:
https://arcticdata.io/metacat/d1/mn/v2/meta/urn%3Auuid%3Ac043a14e-fce4-4e1b-8cc8-1649fe00f45f
notice that the filename has commas. So, visiting:
https://arcticdata.io/metacat/d1/mn/v2/object/urn%3Auuid%3Ac043a14e-fce4-4e1b-8cc8-1649fe00f45f
gives a ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION
in Chrome 52 on Mac. With FF on Mac, the file gets downloaded, but with the wrong name. It is truncated with a name of just 'Modeled '. Either way, I think the solution is to replace commas with underscores for filenames when setting the Content-Disposition
header. I tried to figure out what was 'allowed'. RFC 2616 says the Content-Dispostion
header filename-parm
is a 'quoted-string'. So, perhaps instead of doing character replacements, we just quote all filenames prior to building the header.
Updated by Jing Tao over 8 years ago
- Status changed from New to In Progress
Adding the double quotes on the file name works great. The fix has been submitted to both the 2.7 branch and the trunk. After we decide which target version we will use, we can close the bug.