You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@mesos.apache.org by "Bjoern Metzdorf (JIRA)" <ji...@apache.org> on 2014/06/18 22:32:25 UTC
[jira] [Created] (MESOS-1509) Use Content-Disposition filename (if
available) when downloading HTTP URIs
Bjoern Metzdorf created MESOS-1509:
--------------------------------------
Summary: Use Content-Disposition filename (if available) when downloading HTTP URIs
Key: MESOS-1509
URL: https://issues.apache.org/jira/browse/MESOS-1509
Project: Mesos
Issue Type: Improvement
Components: slave
Affects Versions: 0.18.0, 0.19.0, 0.20.0, 0.21.0
Environment: Linux (but should be irrelevant)
Reporter: Bjoern Metzdorf
Priority: Minor
Currently the slave stores downloaded HTTP URIs in filesnames that contain the part after the last "/" in the URI (in src/launcher/fetcher.cpp:122):
{code}
path = path::join(directory, path.substr(path.find_last_of("/") + 1));
{code}
The problem is that the query string is included in the filename and a URI like {{http://my.web.server/dynamic/resource.tar.gz?a=b}} results in a downloaded file named {{resource.tar.gz?a=b}}.
The curl maintainers faced the same problem and added this:
{code}
-J, --remote-header-name
(HTTP) This option tells the -O, --remote-name option to use the server-specified Content-Disposition filename instead of extracting a filename from the URL.
{code}
Maybe Mesos could do the same if a Content-Disposition header exists.
--
This message was sent by Atlassian JIRA
(v6.2#6252)