{"action":"created","comment":{"url":"https://api.github.com/repos/pallets/flask/pulls/comments/80206246","id":80206246,"diff_hunk":"@@ -575,12 +585,21 @@ def send_file(filename_or_fp, mimetype=None, as_attachment=False,\n             warn('Access %s failed, maybe it does not exist, so ignore etags in '\n                  'headers' % filename, stacklevel=2)\n \n-        if conditional:\n+    if conditional:\n+        try:\n+            # Added in werkzeug 0.12\n+            rv = rv.make_conditional(request, accept_ranges=True,\n+                                     complete_length=fsize)\n+        except TypeError:\n             rv = rv.make_conditional(request)\n-            # make sure we don't send x-sendfile for servers that\n-            # ignore the 304 status code for x-sendfile.\n-            if rv.status_code == 304:\n-                rv.headers.pop('x-sendfile', None)\n+        except RequestedRangeNotSatisfiable:\n+            if close_on_416:","path":"flask/helpers.py","position":66,"original_position":66,"commit_id":"9b88f305768f56fd4bcd3041c584d8d036b0a2e6","original_commit_id":"9b88f305768f56fd4bcd3041c584d8d036b0a2e6","user":{"login":"RonnyPfannschmidt","id":156838,"avatar_url":"https://avatars.githubusercontent.com/u/156838?v=3","gravatar_id":"","url":"https://api.github.com/users/RonnyPfannschmidt","html_url":"https://github.com/RonnyPfannschmidt","followers_url":"https://api.github.com/users/RonnyPfannschmidt/followers","following_url":"https://api.github.com/users/RonnyPfannschmidt/following{/other_user}","gists_url":"https://api.github.com/users/RonnyPfannschmidt/gists{/gist_id}","starred_url":"https://api.github.com/users/RonnyPfannschmidt/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/RonnyPfannschmidt/subscriptions","organizations_url":"https://api.github.com/users/RonnyPfannschmidt/orgs","repos_url":"https://api.github.com/users/RonnyPfannschmidt/repos","events_url":"https://api.github.com/users/RonnyPfannschmidt/events{/privacy}","received_events_url":"https://api.github.com/users/RonnyPfannschmidt/received_events","type":"User","site_admin":false},"body":"as far as i can tell this close specifically closes only if the file was opened in order to maintain unchanged outside ressources\r\n\r\nperhaps a more speaking variable name would help\r\n","created_at":"2016-09-23T09:00:17Z","updated_at":"2016-09-23T09:00:17Z","html_url":"https://github.com/pallets/flask/pull/2031#discussion_r80206246","pull_request_url":"https://api.github.com/repos/pallets/flask/pulls/2031","_links":{"self":{"href":"https://api.github.com/repos/pallets/flask/pulls/comments/80206246"},"html":{"href":"https://github.com/pallets/flask/pull/2031#discussion_r80206246"},"pull_request":{"href":"https://api.github.com/repos/pallets/flask/pulls/2031"}}},"pull_request":{"url":"https://api.github.com/repos/pallets/flask/pulls/2031","id":85928616,"html_url":"https://github.com/pallets/flask/pull/2031","diff_url":"https://github.com/pallets/flask/pull/2031.diff","patch_url":"https://github.com/pallets/flask/pull/2031.patch","issue_url":"https://api.github.com/repos/pallets/flask/issues/2031","number":2031,"state":"open","locked":false,"title":"make use of range requests if available in werkzeug","user":{"login":"magne4000","id":1098371,"avatar_url":"https://avatars.githubusercontent.com/u/1098371?v=3","gravatar_id":"","url":"https://api.github.com/users/magne4000","html_url":"https://github.com/magne4000","followers_url":"https://api.github.com/users/magne4000/followers","following_url":"https://api.github.com/users/magne4000/following{/other_user}","gists_url":"https://api.github.com/users/magne4000/gists{/gist_id}","starred_url":"https://api.github.com/users/magne4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magne4000/subscriptions","organizations_url":"https://api.github.com/users/magne4000/orgs","repos_url":"https://api.github.com/users/magne4000/repos","events_url":"https://api.github.com/users/magne4000/events{/privacy}","received_events_url":"https://api.github.com/users/magne4000/received_events","type":"User","site_admin":false},"body":"\n\n<!-- Reviewable:start -->\nThis change is [<img src=\"https://reviewable.io/review_button.svg\" height=\"34\" align=\"absmiddle\" alt=\"Reviewable\"/>](https://reviewable.io/reviews/pallets/flask/2031)\n<!-- Reviewable:end -->\n","created_at":"2016-09-20T08:09:13Z","updated_at":"2016-09-23T09:00:17Z","closed_at":null,"merged_at":null,"merge_commit_sha":"7fc5ebc34b440688446a975bf74c48f6eeb057ec","assignee":null,"assignees":[],"milestone":null,"commits_url":"https://api.github.com/repos/pallets/flask/pulls/2031/commits","review_comments_url":"https://api.github.com/repos/pallets/flask/pulls/2031/comments","review_comment_url":"https://api.github.com/repos/pallets/flask/pulls/comments{/number}","comments_url":"https://api.github.com/repos/pallets/flask/issues/2031/comments","statuses_url":"https://api.github.com/repos/pallets/flask/statuses/9b88f305768f56fd4bcd3041c584d8d036b0a2e6","head":{"label":"magne4000:master","ref":"master","sha":"9b88f305768f56fd4bcd3041c584d8d036b0a2e6","user":{"login":"magne4000","id":1098371,"avatar_url":"https://avatars.githubusercontent.com/u/1098371?v=3","gravatar_id":"","url":"https://api.github.com/users/magne4000","html_url":"https://github.com/magne4000","followers_url":"https://api.github.com/users/magne4000/followers","following_url":"https://api.github.com/users/magne4000/following{/other_user}","gists_url":"https://api.github.com/users/magne4000/gists{/gist_id}","starred_url":"https://api.github.com/users/magne4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magne4000/subscriptions","organizations_url":"https://api.github.com/users/magne4000/orgs","repos_url":"https://api.github.com/users/magne4000/repos","events_url":"https://api.github.com/users/magne4000/events{/privacy}","received_events_url":"https://api.github.com/users/magne4000/received_events","type":"User","site_admin":false},"repo":{"id":68361555,"name":"flask","full_name":"magne4000/flask","owner":{"login":"magne4000","id":1098371,"avatar_url":"https://avatars.githubusercontent.com/u/1098371?v=3","gravatar_id":"","url":"https://api.github.com/users/magne4000","html_url":"https://github.com/magne4000","followers_url":"https://api.github.com/users/magne4000/followers","following_url":"https://api.github.com/users/magne4000/following{/other_user}","gists_url":"https://api.github.com/users/magne4000/gists{/gist_id}","starred_url":"https://api.github.com/users/magne4000/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/magne4000/subscriptions","organizations_url":"https://api.github.com/users/magne4000/orgs","repos_url":"https://api.github.com/users/magne4000/repos","events_url":"https://api.github.com/users/magne4000/events{/privacy}","received_events_url":"https://api.github.com/users/magne4000/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/magne4000/flask","description":"A microframework based on Werkzeug, Jinja2 and good intentions","fork":true,"url":"https://api.github.com/repos/magne4000/flask","forks_url":"https://api.github.com/repos/magne4000/flask/forks","keys_url":"https://api.github.com/repos/magne4000/flask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/magne4000/flask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/magne4000/flask/teams","hooks_url":"https://api.github.com/repos/magne4000/flask/hooks","issue_events_url":"https://api.github.com/repos/magne4000/flask/issues/events{/number}","events_url":"https://api.github.com/repos/magne4000/flask/events","assignees_url":"https://api.github.com/repos/magne4000/flask/assignees{/user}","branches_url":"https://api.github.com/repos/magne4000/flask/branches{/branch}","tags_url":"https://api.github.com/repos/magne4000/flask/tags","blobs_url":"https://api.github.com/repos/magne4000/flask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/magne4000/flask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/magne4000/flask/git/refs{/sha}","trees_url":"https://api.github.com/repos/magne4000/flask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/magne4000/flask/statuses/{sha}","languages_url":"https://api.github.com/repos/magne4000/flask/languages","stargazers_url":"https://api.github.com/repos/magne4000/flask/stargazers","contributors_url":"https://api.github.com/repos/magne4000/flask/contributors","subscribers_url":"https://api.github.com/repos/magne4000/flask/subscribers","subscription_url":"https://api.github.com/repos/magne4000/flask/subscription","commits_url":"https://api.github.com/repos/magne4000/flask/commits{/sha}","git_commits_url":"https://api.github.com/repos/magne4000/flask/git/commits{/sha}","comments_url":"https://api.github.com/repos/magne4000/flask/comments{/number}","issue_comment_url":"https://api.github.com/repos/magne4000/flask/issues/comments{/number}","contents_url":"https://api.github.com/repos/magne4000/flask/contents/{+path}","compare_url":"https://api.github.com/repos/magne4000/flask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/magne4000/flask/merges","archive_url":"https://api.github.com/repos/magne4000/flask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/magne4000/flask/downloads","issues_url":"https://api.github.com/repos/magne4000/flask/issues{/number}","pulls_url":"https://api.github.com/repos/magne4000/flask/pulls{/number}","milestones_url":"https://api.github.com/repos/magne4000/flask/milestones{/number}","notifications_url":"https://api.github.com/repos/magne4000/flask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/magne4000/flask/labels{/name}","releases_url":"https://api.github.com/repos/magne4000/flask/releases{/id}","deployments_url":"https://api.github.com/repos/magne4000/flask/deployments","created_at":"2016-09-16T07:45:19Z","updated_at":"2016-09-16T07:45:23Z","pushed_at":"2016-09-20T08:08:46Z","git_url":"git://github.com/magne4000/flask.git","ssh_url":"git@github.com:magne4000/flask.git","clone_url":"https://github.com/magne4000/flask.git","svn_url":"https://github.com/magne4000/flask","homepage":"http://flask.pocoo.org/","size":3849,"stargazers_count":0,"watchers_count":0,"language":"Python","has_issues":false,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"open_issues_count":0,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"pallets:master","ref":"master","sha":"01081dbe6cdfa3fc43d8e1fff708d4ed95e1be7e","user":{"login":"pallets","id":16748505,"avatar_url":"https://avatars.githubusercontent.com/u/16748505?v=3","gravatar_id":"","url":"https://api.github.com/users/pallets","html_url":"https://github.com/pallets","followers_url":"https://api.github.com/users/pallets/followers","following_url":"https://api.github.com/users/pallets/following{/other_user}","gists_url":"https://api.github.com/users/pallets/gists{/gist_id}","starred_url":"https://api.github.com/users/pallets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pallets/subscriptions","organizations_url":"https://api.github.com/users/pallets/orgs","repos_url":"https://api.github.com/users/pallets/repos","events_url":"https://api.github.com/users/pallets/events{/privacy}","received_events_url":"https://api.github.com/users/pallets/received_events","type":"Organization","site_admin":false},"repo":{"id":596892,"name":"flask","full_name":"pallets/flask","owner":{"login":"pallets","id":16748505,"avatar_url":"https://avatars.githubusercontent.com/u/16748505?v=3","gravatar_id":"","url":"https://api.github.com/users/pallets","html_url":"https://github.com/pallets","followers_url":"https://api.github.com/users/pallets/followers","following_url":"https://api.github.com/users/pallets/following{/other_user}","gists_url":"https://api.github.com/users/pallets/gists{/gist_id}","starred_url":"https://api.github.com/users/pallets/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/pallets/subscriptions","organizations_url":"https://api.github.com/users/pallets/orgs","repos_url":"https://api.github.com/users/pallets/repos","events_url":"https://api.github.com/users/pallets/events{/privacy}","received_events_url":"https://api.github.com/users/pallets/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/pallets/flask","description":"A microframework based on Werkzeug, Jinja2 and good intentions","fork":false,"url":"https://api.github.com/repos/pallets/flask","forks_url":"https://api.github.com/repos/pallets/flask/forks","keys_url":"https://api.github.com/repos/pallets/flask/keys{/key_id}","collaborators_url":"https://api.github.com/repos/pallets/flask/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/pallets/flask/teams","hooks_url":"https://api.github.com/repos/pallets/flask/hooks","issue_events_url":"https://api.github.com/repos/pallets/flask/issues/events{/number}","events_url":"https://api.github.com/repos/pallets/flask/events","assignees_url":"https://api.github.com/repos/pallets/flask/assignees{/user}","branches_url":"https://api.github.com/repos/pallets/flask/branches{/branch}","tags_url":"https://api.github.com/repos/pallets/flask/tags","blobs_url":"https://api.github.com/repos/pallets/flask/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/pallets/flask/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/pallets/flask/git/refs{/sha}","trees_url":"https://api.github.com/repos/pallets/flask/git/trees{/sha}","statuses_url":"https://api.github.com/repos/pallets/flask/statuses/{sha}","languages_url":"https://api.github.com/repos/pallets/flask/languages","stargazers_url":"https://api.github.com/repos/pallets/flask/stargazers","contributors_url":"https://api.github.com/repos/pallets/flask/contributors","subscribers_url":"https://api.github.com/repos/pallets/flask/subscribers","subscription_url":"https://api.github.com/repos/pallets/flask/subscription","commits_url":"https://api.github.com/repos/pallets/flask/commits{/sha}","git_commits_url":"https://api.github.com/repos/pallets/flask/git/commits{/sha}","comments_url":"https://api.github.com/repos/pallets/flask/comments{/number}","issue_comment_url":"https://api.github.com/repos/pallets/flask/issues/comments{/number}","contents_url":"https://api.github.com/repos/pallets/flask/contents/{+path}","compare_url":"https://api.github.com/repos/pallets/flask/compare/{base}...{head}","merges_url":"https://api.github.com/repos/pallets/flask/merges","archive_url":"https://api.github.com/repos/pallets/flask/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/pallets/flask/downloads","issues_url":"https://api.github.com/repos/pallets/flask/issues{/number}","pulls_url":"https://api.github.com/repos/pallets/flask/pulls{/number}","milestones_url":"https://api.github.com/repos/pallets/flask/milestones{/number}","notifications_url":"https://api.github.com/repos/pallets/flask/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/pallets/flask/labels{/name}","releases_url":"https://api.github.com/repos/pallets/flask/releases{/id}","deployments_url":"https://api.github.com/repos/pallets/flask/deployments","created_at":"2010-04-06T11:11:59Z","updated_at":"2016-09-23T08:28:26Z","pushed_at":"2016-09-21T17:46:47Z","git_url":"git://github.com/pallets/flask.git","ssh_url":"git@github.com:pallets/flask.git","clone_url":"https://github.com/pallets/flask.git","svn_url":"https://github.com/pallets/flask","homepage":"http://flask.pocoo.org/","size":11246,"stargazers_count":22684,"watchers_count":22684,"language":"Python","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":7188,"mirror_url":null,"open_issues_count":144,"forks":7188,"open_issues":144,"watchers":22684,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/pallets/flask/pulls/2031"},"html":{"href":"https://github.com/pallets/flask/pull/2031"},"issue":{"href":"https://api.github.com/repos/pallets/flask/issues/2031"},"comments":{"href":"https://api.github.com/repos/pallets/flask/issues/2031/comments"},"review_comments":{"href":"https://api.github.com/repos/pallets/flask/pulls/2031/comments"},"review_comment":{"href":"https://api.github.com/repos/pallets/flask/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/pallets/flask/pulls/2031/commits"},"statuses":{"href":"https://api.github.com/repos/pallets/flask/statuses/9b88f305768f56fd4bcd3041c584d8d036b0a2e6"}}}}
{"actor":{"display_login":"RonnyPfannschmidt"}}