{"action":"opened","issue":{"url":"https://api.github.com/repos/modc08/modc08/issues/57","labels_url":"https://api.github.com/repos/modc08/modc08/issues/57/labels{/name}","comments_url":"https://api.github.com/repos/modc08/modc08/issues/57/comments","events_url":"https://api.github.com/repos/modc08/modc08/issues/57/events","html_url":"https://github.com/modc08/modc08/issues/57","id":63159312,"number":57,"title":"Wrong output filename when direct downloading outside of browser / 'Remote file name has no length' error","user":{"login":"franksc","id":8837821,"avatar_url":"https://avatars.githubusercontent.com/u/8837821?v=3","gravatar_id":"","url":"https://api.github.com/users/franksc","html_url":"https://github.com/franksc","followers_url":"https://api.github.com/users/franksc/followers","following_url":"https://api.github.com/users/franksc/following{/other_user}","gists_url":"https://api.github.com/users/franksc/gists{/gist_id}","starred_url":"https://api.github.com/users/franksc/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/franksc/subscriptions","organizations_url":"https://api.github.com/users/franksc/orgs","repos_url":"https://api.github.com/users/franksc/repos","events_url":"https://api.github.com/users/franksc/events{/privacy}","received_events_url":"https://api.github.com/users/franksc/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/modc08/modc08/labels/bug","name":"bug","color":"fc2929"}],"state":"open","locked":false,"assignee":{"login":"craigpatten","id":1353030,"avatar_url":"https://avatars.githubusercontent.com/u/1353030?v=3","gravatar_id":"","url":"https://api.github.com/users/craigpatten","html_url":"https://github.com/craigpatten","followers_url":"https://api.github.com/users/craigpatten/followers","following_url":"https://api.github.com/users/craigpatten/following{/other_user}","gists_url":"https://api.github.com/users/craigpatten/gists{/gist_id}","starred_url":"https://api.github.com/users/craigpatten/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/craigpatten/subscriptions","organizations_url":"https://api.github.com/users/craigpatten/orgs","repos_url":"https://api.github.com/users/craigpatten/repos","events_url":"https://api.github.com/users/craigpatten/events{/privacy}","received_events_url":"https://api.github.com/users/craigpatten/received_events","type":"User","site_admin":false},"milestone":{"url":"https://api.github.com/repos/modc08/modc08/milestones/5","html_url":"https://github.com/modc08/modc08/milestones/Fixes%20-%20miscellaneous%20loose%20ends","labels_url":"https://api.github.com/repos/modc08/modc08/milestones/5/labels","id":1013894,"number":5,"title":"Fixes - miscellaneous loose ends","description":"Everything to tidy up before UAT","creator":{"login":"millercathy","id":9669002,"avatar_url":"https://avatars.githubusercontent.com/u/9669002?v=3","gravatar_id":"","url":"https://api.github.com/users/millercathy","html_url":"https://github.com/millercathy","followers_url":"https://api.github.com/users/millercathy/followers","following_url":"https://api.github.com/users/millercathy/following{/other_user}","gists_url":"https://api.github.com/users/millercathy/gists{/gist_id}","starred_url":"https://api.github.com/users/millercathy/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/millercathy/subscriptions","organizations_url":"https://api.github.com/users/millercathy/orgs","repos_url":"https://api.github.com/users/millercathy/repos","events_url":"https://api.github.com/users/millercathy/events{/privacy}","received_events_url":"https://api.github.com/users/millercathy/received_events","type":"User","site_admin":false},"open_issues":3,"closed_issues":2,"state":"open","created_at":"2015-03-10T00:01:30Z","updated_at":"2015-03-20T04:23:14Z","due_on":"2015-04-02T13:30:00Z","closed_at":null},"comments":0,"created_at":"2015-03-20T04:23:14Z","updated_at":"2015-03-20T04:23:14Z","closed_at":null,"body":"When downloading a MyTardis individual file, dataset tar or experiment tar via URLs with form mytardisexample.com/api/v1/dataset_file/*id*/download or .../download/*dataset*|*experiment*/*id*/tar/ outside of the browser window navigating the repository site e.g. on the command line via wget or curl, the output filename is incorrect. Also, curl returns a 'Remote file name has no length' error when trying to download dataset and experiment tar URLs with a trailing slash. (The URL linked from a MyTardis blue 'tar' download button has the trailing slash)\r\n\r\nE.g using wget *url*:\r\n- http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/api/v1/dataset_file/4/download outputs to filename 'download'\r\n- http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/download/dataset/4/tar/ outputs to filename 'index.html'\r\n- http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/download/experiment/3/tar/ outputs to filename 'index.html'\r\n\r\nE.g. using curl -O -L *url*:\r\n- http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/api/v1/dataset_file/4/download outputs to filename 'download'\r\n- http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/download/dataset/4/tar/ returns a 'Remote file name has no length' error\r\n    - http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/download/dataset/4/tar (without the trailing slash) outputs to filename 'tar'\r\n- http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/download/experiment/3/tar/ returns a 'Remote file name has no length' error\r\n    - http://vm-frontend-tweaks-20150316-130458.modc08.ersa.edu.au/download/experiment/3/tar (without the trailing slash) outputs to filename 'tar'\r\n\r\n(NB tested with wget 1.15 and curl 7.37.1 on OS X)"}}