{"action":"opened","number":4770,"pull_request":{"url":"https://api.github.com/repos/playframework/playframework/pulls/4770","id":38596846,"html_url":"https://github.com/playframework/playframework/pull/4770","diff_url":"https://github.com/playframework/playframework/pull/4770.diff","patch_url":"https://github.com/playframework/playframework/pull/4770.patch","issue_url":"https://api.github.com/repos/playframework/playframework/issues/4770","number":4770,"state":"open","locked":false,"title":"Add support for byte-range requests (for download resumptions, video playbacks, etc.)","user":{"login":"bjfletcher","id":733849,"avatar_url":"https://avatars.githubusercontent.com/u/733849?v=3","gravatar_id":"","url":"https://api.github.com/users/bjfletcher","html_url":"https://github.com/bjfletcher","followers_url":"https://api.github.com/users/bjfletcher/followers","following_url":"https://api.github.com/users/bjfletcher/following{/other_user}","gists_url":"https://api.github.com/users/bjfletcher/gists{/gist_id}","starred_url":"https://api.github.com/users/bjfletcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjfletcher/subscriptions","organizations_url":"https://api.github.com/users/bjfletcher/orgs","repos_url":"https://api.github.com/users/bjfletcher/repos","events_url":"https://api.github.com/users/bjfletcher/events{/privacy}","received_events_url":"https://api.github.com/users/bjfletcher/received_events","type":"User","site_admin":false},"body":"Greetings,\r\n\r\nThis pull request adds support for byte-range requests with `sendFile`.\r\n\r\nIt is backward-compatible in that `sendFile` now has a new argument at the end that is optional and has a default value of `None`. This argument would take in the `RANGE` header.  Example of usage:\r\n\r\n    Ok.sendFile(new File(\"file\"), range = request.headers.get(RANGE))\r\n\r\nIn terms of Java, the existing API remains the same with the addition of new `sendFile` overloaded methods that allow the passing in of the `RANGE` header string.\r\n\r\nThere's one design aspect of this that I'm not 100% happy with.  This is where the `OK` in `Ok.sendFile(...)` gets replaced with `PARTIAL_CONTENT` if the range header is used. Using `PartialContent.sendFile(...)` would mean asking the user to examine for whether there is a `RANGE` header, and then using `PartialContent.sendFile(...)` instead of `Ok.sendFile(...)`. It'd be nice if the user was freed of this job and just pass in the file along with any `RANGE` header.\r\n","created_at":"2015-06-25T21:43:29Z","updated_at":"2015-06-25T21:43:29Z","closed_at":null,"merged_at":null,"merge_commit_sha":"5a06b4f87c1fcf25e442113eb79931c355d05516","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/playframework/playframework/pulls/4770/commits","review_comments_url":"https://api.github.com/repos/playframework/playframework/pulls/4770/comments","review_comment_url":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}","comments_url":"https://api.github.com/repos/playframework/playframework/issues/4770/comments","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/d719a3ec94cf428e3e0878656fe54cf62f9a07d6","head":{"label":"bjfletcher:master","ref":"master","sha":"d719a3ec94cf428e3e0878656fe54cf62f9a07d6","user":{"login":"bjfletcher","id":733849,"avatar_url":"https://avatars.githubusercontent.com/u/733849?v=3","gravatar_id":"","url":"https://api.github.com/users/bjfletcher","html_url":"https://github.com/bjfletcher","followers_url":"https://api.github.com/users/bjfletcher/followers","following_url":"https://api.github.com/users/bjfletcher/following{/other_user}","gists_url":"https://api.github.com/users/bjfletcher/gists{/gist_id}","starred_url":"https://api.github.com/users/bjfletcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjfletcher/subscriptions","organizations_url":"https://api.github.com/users/bjfletcher/orgs","repos_url":"https://api.github.com/users/bjfletcher/repos","events_url":"https://api.github.com/users/bjfletcher/events{/privacy}","received_events_url":"https://api.github.com/users/bjfletcher/received_events","type":"User","site_admin":false},"repo":{"id":23148003,"name":"playframework","full_name":"bjfletcher/playframework","owner":{"login":"bjfletcher","id":733849,"avatar_url":"https://avatars.githubusercontent.com/u/733849?v=3","gravatar_id":"","url":"https://api.github.com/users/bjfletcher","html_url":"https://github.com/bjfletcher","followers_url":"https://api.github.com/users/bjfletcher/followers","following_url":"https://api.github.com/users/bjfletcher/following{/other_user}","gists_url":"https://api.github.com/users/bjfletcher/gists{/gist_id}","starred_url":"https://api.github.com/users/bjfletcher/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bjfletcher/subscriptions","organizations_url":"https://api.github.com/users/bjfletcher/orgs","repos_url":"https://api.github.com/users/bjfletcher/repos","events_url":"https://api.github.com/users/bjfletcher/events{/privacy}","received_events_url":"https://api.github.com/users/bjfletcher/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/bjfletcher/playframework","description":"Play Framework","fork":true,"url":"https://api.github.com/repos/bjfletcher/playframework","forks_url":"https://api.github.com/repos/bjfletcher/playframework/forks","keys_url":"https://api.github.com/repos/bjfletcher/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/bjfletcher/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/bjfletcher/playframework/teams","hooks_url":"https://api.github.com/repos/bjfletcher/playframework/hooks","issue_events_url":"https://api.github.com/repos/bjfletcher/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/bjfletcher/playframework/events","assignees_url":"https://api.github.com/repos/bjfletcher/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/bjfletcher/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/bjfletcher/playframework/tags","blobs_url":"https://api.github.com/repos/bjfletcher/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/bjfletcher/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/bjfletcher/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/bjfletcher/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/bjfletcher/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/bjfletcher/playframework/languages","stargazers_url":"https://api.github.com/repos/bjfletcher/playframework/stargazers","contributors_url":"https://api.github.com/repos/bjfletcher/playframework/contributors","subscribers_url":"https://api.github.com/repos/bjfletcher/playframework/subscribers","subscription_url":"https://api.github.com/repos/bjfletcher/playframework/subscription","commits_url":"https://api.github.com/repos/bjfletcher/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/bjfletcher/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/bjfletcher/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/bjfletcher/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/bjfletcher/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/bjfletcher/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/bjfletcher/playframework/merges","archive_url":"https://api.github.com/repos/bjfletcher/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/bjfletcher/playframework/downloads","issues_url":"https://api.github.com/repos/bjfletcher/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/bjfletcher/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/bjfletcher/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/bjfletcher/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/bjfletcher/playframework/labels{/name}","releases_url":"https://api.github.com/repos/bjfletcher/playframework/releases{/id}","created_at":"2014-08-20T12:38:02Z","updated_at":"2015-01-31T22:21:12Z","pushed_at":"2015-06-25T21:31:08Z","git_url":"git://github.com/bjfletcher/playframework.git","ssh_url":"git@github.com:bjfletcher/playframework.git","clone_url":"https://github.com/bjfletcher/playframework.git","svn_url":"https://github.com/bjfletcher/playframework","homepage":"http://www.playframework.com/","size":76995,"stargazers_count":0,"watchers_count":0,"language":"Scala","has_issues":false,"has_downloads":true,"has_wiki":false,"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":"playframework:master","ref":"master","sha":"10366e17c4aec30a76cfb666336af2a6bb3063fc","user":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"repo":{"id":2340549,"name":"playframework","full_name":"playframework/playframework","owner":{"login":"playframework","id":319107,"avatar_url":"https://avatars.githubusercontent.com/u/319107?v=3","gravatar_id":"","url":"https://api.github.com/users/playframework","html_url":"https://github.com/playframework","followers_url":"https://api.github.com/users/playframework/followers","following_url":"https://api.github.com/users/playframework/following{/other_user}","gists_url":"https://api.github.com/users/playframework/gists{/gist_id}","starred_url":"https://api.github.com/users/playframework/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/playframework/subscriptions","organizations_url":"https://api.github.com/users/playframework/orgs","repos_url":"https://api.github.com/users/playframework/repos","events_url":"https://api.github.com/users/playframework/events{/privacy}","received_events_url":"https://api.github.com/users/playframework/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/playframework/playframework","description":"Play Framework","fork":false,"url":"https://api.github.com/repos/playframework/playframework","forks_url":"https://api.github.com/repos/playframework/playframework/forks","keys_url":"https://api.github.com/repos/playframework/playframework/keys{/key_id}","collaborators_url":"https://api.github.com/repos/playframework/playframework/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/playframework/playframework/teams","hooks_url":"https://api.github.com/repos/playframework/playframework/hooks","issue_events_url":"https://api.github.com/repos/playframework/playframework/issues/events{/number}","events_url":"https://api.github.com/repos/playframework/playframework/events","assignees_url":"https://api.github.com/repos/playframework/playframework/assignees{/user}","branches_url":"https://api.github.com/repos/playframework/playframework/branches{/branch}","tags_url":"https://api.github.com/repos/playframework/playframework/tags","blobs_url":"https://api.github.com/repos/playframework/playframework/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/playframework/playframework/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/playframework/playframework/git/refs{/sha}","trees_url":"https://api.github.com/repos/playframework/playframework/git/trees{/sha}","statuses_url":"https://api.github.com/repos/playframework/playframework/statuses/{sha}","languages_url":"https://api.github.com/repos/playframework/playframework/languages","stargazers_url":"https://api.github.com/repos/playframework/playframework/stargazers","contributors_url":"https://api.github.com/repos/playframework/playframework/contributors","subscribers_url":"https://api.github.com/repos/playframework/playframework/subscribers","subscription_url":"https://api.github.com/repos/playframework/playframework/subscription","commits_url":"https://api.github.com/repos/playframework/playframework/commits{/sha}","git_commits_url":"https://api.github.com/repos/playframework/playframework/git/commits{/sha}","comments_url":"https://api.github.com/repos/playframework/playframework/comments{/number}","issue_comment_url":"https://api.github.com/repos/playframework/playframework/issues/comments{/number}","contents_url":"https://api.github.com/repos/playframework/playframework/contents/{+path}","compare_url":"https://api.github.com/repos/playframework/playframework/compare/{base}...{head}","merges_url":"https://api.github.com/repos/playframework/playframework/merges","archive_url":"https://api.github.com/repos/playframework/playframework/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/playframework/playframework/downloads","issues_url":"https://api.github.com/repos/playframework/playframework/issues{/number}","pulls_url":"https://api.github.com/repos/playframework/playframework/pulls{/number}","milestones_url":"https://api.github.com/repos/playframework/playframework/milestones{/number}","notifications_url":"https://api.github.com/repos/playframework/playframework/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/playframework/playframework/labels{/name}","releases_url":"https://api.github.com/repos/playframework/playframework/releases{/id}","created_at":"2011-09-07T09:24:08Z","updated_at":"2015-06-25T21:11:04Z","pushed_at":"2015-06-25T21:43:30Z","git_url":"git://github.com/playframework/playframework.git","ssh_url":"git@github.com:playframework/playframework.git","clone_url":"https://github.com/playframework/playframework.git","svn_url":"https://github.com/playframework/playframework","homepage":"http://www.playframework.com/","size":127034,"stargazers_count":6457,"watchers_count":6457,"language":"Scala","has_issues":true,"has_downloads":true,"has_wiki":false,"has_pages":false,"forks_count":2282,"mirror_url":null,"open_issues_count":246,"forks":2282,"open_issues":246,"watchers":6457,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/playframework/playframework/pulls/4770"},"html":{"href":"https://github.com/playframework/playframework/pull/4770"},"issue":{"href":"https://api.github.com/repos/playframework/playframework/issues/4770"},"comments":{"href":"https://api.github.com/repos/playframework/playframework/issues/4770/comments"},"review_comments":{"href":"https://api.github.com/repos/playframework/playframework/pulls/4770/comments"},"review_comment":{"href":"https://api.github.com/repos/playframework/playframework/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/playframework/playframework/pulls/4770/commits"},"statuses":{"href":"https://api.github.com/repos/playframework/playframework/statuses/d719a3ec94cf428e3e0878656fe54cf62f9a07d6"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":9,"additions":97,"deletions":11,"changed_files":7}}