{"action":"created","issue":{"url":"https://api.github.com/repos/pallets/flask/issues/2943","repository_url":"https://api.github.com/repos/pallets/flask","labels_url":"https://api.github.com/repos/pallets/flask/issues/2943/labels{/name}","comments_url":"https://api.github.com/repos/pallets/flask/issues/2943/comments","events_url":"https://api.github.com/repos/pallets/flask/issues/2943/events","html_url":"https://github.com/pallets/flask/issues/2943","id":370171413,"node_id":"MDU6SXNzdWUzNzAxNzE0MTM=","number":2943,"title":"Trouble with function send_file and range","user":{"login":"PavelProkhorov","id":43439988,"node_id":"MDQ6VXNlcjQzNDM5OTg4","avatar_url":"https://avatars1.githubusercontent.com/u/43439988?v=4","gravatar_id":"","url":"https://api.github.com/users/PavelProkhorov","html_url":"https://github.com/PavelProkhorov","followers_url":"https://api.github.com/users/PavelProkhorov/followers","following_url":"https://api.github.com/users/PavelProkhorov/following{/other_user}","gists_url":"https://api.github.com/users/PavelProkhorov/gists{/gist_id}","starred_url":"https://api.github.com/users/PavelProkhorov/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/PavelProkhorov/subscriptions","organizations_url":"https://api.github.com/users/PavelProkhorov/orgs","repos_url":"https://api.github.com/users/PavelProkhorov/repos","events_url":"https://api.github.com/users/PavelProkhorov/events{/privacy}","received_events_url":"https://api.github.com/users/PavelProkhorov/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2018-10-15T13:46:53Z","updated_at":"2018-10-16T14:14:33Z","closed_at":null,"author_association":"NONE","body":"Hi! \r\n\r\nWhy function send_file don't support Range header in request?\r\nI send request with next header: Range: bytes=0-10.\r\n\r\n this is part of my code: \r\n return send_file(file, attachment_filename=filename, conditional=True)\r\n\r\n But flask application return status code 200 instead 206. \r\n\r\n---\r\n\r\n### Expected Behavior\r\nstatus code = 206\r\n\r\n\r\n### Actual Behavior\r\nstatus code = 200\r\n\r\n### Environment\r\n\r\n* Python version: 3.5.3\r\n* Flask version: 1.0.2\r\n* Werkzeug version:\r\n"},"comment":{"url":"https://api.github.com/repos/pallets/flask/issues/comments/430253965","html_url":"https://github.com/pallets/flask/issues/2943#issuecomment-430253965","issue_url":"https://api.github.com/repos/pallets/flask/issues/2943","id":430253965,"node_id":"MDEyOklzc3VlQ29tbWVudDQzMDI1Mzk2NQ==","user":{"login":"IgnasiBosch","id":7078953,"node_id":"MDQ6VXNlcjcwNzg5NTM=","avatar_url":"https://avatars0.githubusercontent.com/u/7078953?v=4","gravatar_id":"","url":"https://api.github.com/users/IgnasiBosch","html_url":"https://github.com/IgnasiBosch","followers_url":"https://api.github.com/users/IgnasiBosch/followers","following_url":"https://api.github.com/users/IgnasiBosch/following{/other_user}","gists_url":"https://api.github.com/users/IgnasiBosch/gists{/gist_id}","starred_url":"https://api.github.com/users/IgnasiBosch/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/IgnasiBosch/subscriptions","organizations_url":"https://api.github.com/users/IgnasiBosch/orgs","repos_url":"https://api.github.com/users/IgnasiBosch/repos","events_url":"https://api.github.com/users/IgnasiBosch/events{/privacy}","received_events_url":"https://api.github.com/users/IgnasiBosch/received_events","type":"User","site_admin":false},"created_at":"2018-10-16T14:14:33Z","updated_at":"2018-10-16T14:14:33Z","author_association":"NONE","body":"Hi again @PavelProkhorov, \r\njust guessing, what you are trying to do has slight streaming flavor, isn't?. I wouldn't say this is the best approach as it will download from the ftp the entire file, each time! If you use a common file instead (downloading from the ftp just the first time to a temporary folder, cached or whatever) Partial content should work properly. \r\nEventhough I'll take a look if there are any other constrain regarding request a range size of a bytesIO"}}
{"actor":{"display_login":"IgnasiBosch"}}