{"action":"closed","number":7,"pull_request":{"url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/7","id":41882583,"html_url":"https://github.com/distilledmedia/Media-Server-Lite/pull/7","diff_url":"https://github.com/distilledmedia/Media-Server-Lite/pull/7.diff","patch_url":"https://github.com/distilledmedia/Media-Server-Lite/pull/7.patch","issue_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/7","number":7,"state":"closed","locked":false,"title":"Improve HTTP Status and Cache Headers","user":{"login":"diarmuidie","id":707037,"avatar_url":"https://avatars.githubusercontent.com/u/707037?v=3","gravatar_id":"","url":"https://api.github.com/users/diarmuidie","html_url":"https://github.com/diarmuidie","followers_url":"https://api.github.com/users/diarmuidie/followers","following_url":"https://api.github.com/users/diarmuidie/following{/other_user}","gists_url":"https://api.github.com/users/diarmuidie/gists{/gist_id}","starred_url":"https://api.github.com/users/diarmuidie/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/diarmuidie/subscriptions","organizations_url":"https://api.github.com/users/diarmuidie/orgs","repos_url":"https://api.github.com/users/diarmuidie/repos","events_url":"https://api.github.com/users/diarmuidie/events{/privacy}","received_events_url":"https://api.github.com/users/diarmuidie/received_events","type":"User","site_admin":false},"body":"All unsuccessful requests were responding with a `500 Internal Server Error` response. The 500 response had an expiry header for one year in the future so were being cached by the CDN.\r\n\r\nMade a few improvements to the caching and status headers:\r\n\r\n- Reduce cache age from 1 year to 1 month (based on the [H5BP guidelines](https://github.com/h5bp/server-configs-nginx/blob/master/h5bp/location/expires.conf)).\r\n- Respond with a `400 Bad Request` header when the server fails to decrypt the URI hash.\r\n- Respond with a `404 Not Found` header when an image can't be found in the local or master cache.\r\n- Added `Cache-Control` headers to 200 responses to cache the response for 30 days. All other responses get a `Cache-Control: no-cache, must-revalidate` header.\r\n- Added a polyfill script to backport the `http_response_code ()` function to PHP < 5.4.","created_at":"2015-08-07T11:25:12Z","updated_at":"2015-08-25T09:55:23Z","closed_at":"2015-08-25T09:55:23Z","merged_at":null,"merge_commit_sha":"9c4f02e1b7fe54014713d5e009f800aa1fed4dae","assignee":null,"milestone":null,"commits_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/7/commits","review_comments_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/7/comments","review_comment_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/comments{/number}","comments_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/7/comments","statuses_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/statuses/262a73d1ec71018a081ae50030ac0b4cb48f530b","head":{"label":"distilledmedia:fix-error-status-codes-and-headers","ref":"fix-error-status-codes-and-headers","sha":"262a73d1ec71018a081ae50030ac0b4cb48f530b","user":{"login":"distilledmedia","id":612848,"avatar_url":"https://avatars.githubusercontent.com/u/612848?v=3","gravatar_id":"","url":"https://api.github.com/users/distilledmedia","html_url":"https://github.com/distilledmedia","followers_url":"https://api.github.com/users/distilledmedia/followers","following_url":"https://api.github.com/users/distilledmedia/following{/other_user}","gists_url":"https://api.github.com/users/distilledmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/distilledmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distilledmedia/subscriptions","organizations_url":"https://api.github.com/users/distilledmedia/orgs","repos_url":"https://api.github.com/users/distilledmedia/repos","events_url":"https://api.github.com/users/distilledmedia/events{/privacy}","received_events_url":"https://api.github.com/users/distilledmedia/received_events","type":"Organization","site_admin":false},"repo":{"id":1263963,"name":"Media-Server-Lite","full_name":"distilledmedia/Media-Server-Lite","owner":{"login":"distilledmedia","id":612848,"avatar_url":"https://avatars.githubusercontent.com/u/612848?v=3","gravatar_id":"","url":"https://api.github.com/users/distilledmedia","html_url":"https://github.com/distilledmedia","followers_url":"https://api.github.com/users/distilledmedia/followers","following_url":"https://api.github.com/users/distilledmedia/following{/other_user}","gists_url":"https://api.github.com/users/distilledmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/distilledmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distilledmedia/subscriptions","organizations_url":"https://api.github.com/users/distilledmedia/orgs","repos_url":"https://api.github.com/users/distilledmedia/repos","events_url":"https://api.github.com/users/distilledmedia/events{/privacy}","received_events_url":"https://api.github.com/users/distilledmedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/distilledmedia/Media-Server-Lite","description":"Light-weight media server, giving greater control over images re-served from 3rd party sources","fork":false,"url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite","forks_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/forks","keys_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/teams","hooks_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/hooks","issue_events_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/events{/number}","events_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/events","assignees_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/assignees{/user}","branches_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/branches{/branch}","tags_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/tags","blobs_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/statuses/{sha}","languages_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/languages","stargazers_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/stargazers","contributors_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/contributors","subscribers_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/subscribers","subscription_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/subscription","commits_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/contents/{+path}","compare_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/merges","archive_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/downloads","issues_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues{/number}","pulls_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls{/number}","milestones_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/milestones{/number}","notifications_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/labels{/name}","releases_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/releases{/id}","created_at":"2011-01-17T16:36:27Z","updated_at":"2014-02-21T16:32:58Z","pushed_at":"2015-08-07T11:25:12Z","git_url":"git://github.com/distilledmedia/Media-Server-Lite.git","ssh_url":"git@github.com:distilledmedia/Media-Server-Lite.git","clone_url":"https://github.com/distilledmedia/Media-Server-Lite.git","svn_url":"https://github.com/distilledmedia/Media-Server-Lite","homepage":"","size":253,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"base":{"label":"distilledmedia:master","ref":"master","sha":"87a860cd9be81053df7166231606361a6a19776a","user":{"login":"distilledmedia","id":612848,"avatar_url":"https://avatars.githubusercontent.com/u/612848?v=3","gravatar_id":"","url":"https://api.github.com/users/distilledmedia","html_url":"https://github.com/distilledmedia","followers_url":"https://api.github.com/users/distilledmedia/followers","following_url":"https://api.github.com/users/distilledmedia/following{/other_user}","gists_url":"https://api.github.com/users/distilledmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/distilledmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distilledmedia/subscriptions","organizations_url":"https://api.github.com/users/distilledmedia/orgs","repos_url":"https://api.github.com/users/distilledmedia/repos","events_url":"https://api.github.com/users/distilledmedia/events{/privacy}","received_events_url":"https://api.github.com/users/distilledmedia/received_events","type":"Organization","site_admin":false},"repo":{"id":1263963,"name":"Media-Server-Lite","full_name":"distilledmedia/Media-Server-Lite","owner":{"login":"distilledmedia","id":612848,"avatar_url":"https://avatars.githubusercontent.com/u/612848?v=3","gravatar_id":"","url":"https://api.github.com/users/distilledmedia","html_url":"https://github.com/distilledmedia","followers_url":"https://api.github.com/users/distilledmedia/followers","following_url":"https://api.github.com/users/distilledmedia/following{/other_user}","gists_url":"https://api.github.com/users/distilledmedia/gists{/gist_id}","starred_url":"https://api.github.com/users/distilledmedia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/distilledmedia/subscriptions","organizations_url":"https://api.github.com/users/distilledmedia/orgs","repos_url":"https://api.github.com/users/distilledmedia/repos","events_url":"https://api.github.com/users/distilledmedia/events{/privacy}","received_events_url":"https://api.github.com/users/distilledmedia/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/distilledmedia/Media-Server-Lite","description":"Light-weight media server, giving greater control over images re-served from 3rd party sources","fork":false,"url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite","forks_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/forks","keys_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/keys{/key_id}","collaborators_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/teams","hooks_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/hooks","issue_events_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/events{/number}","events_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/events","assignees_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/assignees{/user}","branches_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/branches{/branch}","tags_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/tags","blobs_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/refs{/sha}","trees_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/trees{/sha}","statuses_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/statuses/{sha}","languages_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/languages","stargazers_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/stargazers","contributors_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/contributors","subscribers_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/subscribers","subscription_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/subscription","commits_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/commits{/sha}","git_commits_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/git/commits{/sha}","comments_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/comments{/number}","issue_comment_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/comments{/number}","contents_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/contents/{+path}","compare_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/compare/{base}...{head}","merges_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/merges","archive_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/downloads","issues_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues{/number}","pulls_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls{/number}","milestones_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/milestones{/number}","notifications_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/labels{/name}","releases_url":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/releases{/id}","created_at":"2011-01-17T16:36:27Z","updated_at":"2014-02-21T16:32:58Z","pushed_at":"2015-08-07T11:25:12Z","git_url":"git://github.com/distilledmedia/Media-Server-Lite.git","ssh_url":"git@github.com:distilledmedia/Media-Server-Lite.git","clone_url":"https://github.com/distilledmedia/Media-Server-Lite.git","svn_url":"https://github.com/distilledmedia/Media-Server-Lite","homepage":"","size":253,"stargazers_count":3,"watchers_count":3,"language":"PHP","has_issues":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":1,"mirror_url":null,"open_issues_count":1,"forks":1,"open_issues":1,"watchers":3,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/7"},"html":{"href":"https://github.com/distilledmedia/Media-Server-Lite/pull/7"},"issue":{"href":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/7"},"comments":{"href":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/issues/7/comments"},"review_comments":{"href":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/7/comments"},"review_comment":{"href":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/pulls/7/commits"},"statuses":{"href":"https://api.github.com/repos/distilledmedia/Media-Server-Lite/statuses/262a73d1ec71018a081ae50030ac0b4cb48f530b"}},"merged":false,"mergeable":true,"mergeable_state":"clean","merged_by":null,"comments":0,"review_comments":0,"commits":7,"additions":119,"deletions":19,"changed_files":2}}