Details
-
Improvement
-
Status: Open
-
Minor
-
Resolution: Unresolved
-
0.18.0, 0.19.0, 0.20.0, 0.21.0
-
None
-
None
-
Linux (but should be irrelevant)
Description
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):
path = path::join(directory, path.substr(path.find_last_of("/") + 1));
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:
-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.
Maybe Mesos could do the same if a Content-Disposition header exists.
Attachments
Issue Links
- is related to
-
MESOS-1686 URI query strings are preserved in local filename
- Open
-
MESOS-3367 Mesos fetcher does not extract archives for URI with parameters
- Resolved
- relates to
-
MESOS-4735 CommandInfo.URI should allow specifying target filename
- Resolved