[
https://issues.apache.org/jira/browse/MESOS-1509?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15105963#comment-15105963
]
Erik Weathers commented on MESOS-1509:
--------------------------------------
[~bmetzdorf]: have you confirmed that mesos currently disregards the
"Content-Disposition filename"? i.e., it wasn't clear to me from the
Description whether you tested with a web server that included the
Content-Disposition header in the response for
{{http://my.web.server/dynamic/resource.tar.gz?a=b}}
> 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 filenames that are made up
> from 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.3.4#6332)