Project

General

Profile

Bug #7084

Metacat creates an Invalid Content-Disposition value for some filenames

Added by Chris Jones about 3 years ago. Updated about 3 years ago.

Status:
Closed
Priority:
Normal
Assignee:
Category:
metacat
Target version:
Start date:
08/10/2016
Due date:
% Done:

0%

Estimated time:
Bugzilla-Id:

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.

History

#1 Updated by Jing Tao about 3 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.

#2 Updated by Jing Tao about 3 years ago

  • Target version set to 2.7.2

#3 Updated by Jing Tao about 3 years ago

  • Status changed from In Progress to Closed

Also available in: Atom PDF