{"action":"created","issue":{"url":"https://api.github.com/repos/Fantomas42/django-livereload/issues/7","labels_url":"https://api.github.com/repos/Fantomas42/django-livereload/issues/7/labels{/name}","comments_url":"https://api.github.com/repos/Fantomas42/django-livereload/issues/7/comments","events_url":"https://api.github.com/repos/Fantomas42/django-livereload/issues/7/events","html_url":"https://github.com/Fantomas42/django-livereload/pull/7","id":85179013,"number":7,"title":"fixing 500 error with middleware when trying to serve static asset.","user":{"login":"ryanbagwell","id":365105,"avatar_url":"https://avatars.githubusercontent.com/u/365105?v=3","gravatar_id":"","url":"https://api.github.com/users/ryanbagwell","html_url":"https://github.com/ryanbagwell","followers_url":"https://api.github.com/users/ryanbagwell/followers","following_url":"https://api.github.com/users/ryanbagwell/following{/other_user}","gists_url":"https://api.github.com/users/ryanbagwell/gists{/gist_id}","starred_url":"https://api.github.com/users/ryanbagwell/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ryanbagwell/subscriptions","organizations_url":"https://api.github.com/users/ryanbagwell/orgs","repos_url":"https://api.github.com/users/ryanbagwell/repos","events_url":"https://api.github.com/users/ryanbagwell/events{/privacy}","received_events_url":"https://api.github.com/users/ryanbagwell/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-06-04T16:44:04Z","updated_at":"2015-06-15T09:39:36Z","closed_at":"2015-06-15T09:35:45Z","pull_request":{"url":"https://api.github.com/repos/Fantomas42/django-livereload/pulls/7","html_url":"https://github.com/Fantomas42/django-livereload/pull/7","diff_url":"https://github.com/Fantomas42/django-livereload/pull/7.diff","patch_url":"https://github.com/Fantomas42/django-livereload/pull/7.patch"},"body":"This fixes a 500 error that is thrown when using the middleware and serving serving static assets.\r\n\r\nYour code currently checks to see if the string ````<html```` was in ````response.content````. A response from a file object does not have the ````content```` attribute, and as a result, an ````AttributeError```` was thrown when serving static assets.\r\n\r\nThis pull request checks for the inclusion of the string ````html```` in the content-type header value. If html is not in the header string, the middleware processing ends and returns the response object. All other edits are pep8 compatibility changes."},"comment":{"url":"https://api.github.com/repos/Fantomas42/django-livereload/issues/comments/111998453","html_url":"https://github.com/Fantomas42/django-livereload/pull/7#issuecomment-111998453","issue_url":"https://api.github.com/repos/Fantomas42/django-livereload/issues/7","id":111998453,"user":{"login":"Fantomas42","id":100376,"avatar_url":"https://avatars.githubusercontent.com/u/100376?v=3","gravatar_id":"","url":"https://api.github.com/users/Fantomas42","html_url":"https://github.com/Fantomas42","followers_url":"https://api.github.com/users/Fantomas42/followers","following_url":"https://api.github.com/users/Fantomas42/following{/other_user}","gists_url":"https://api.github.com/users/Fantomas42/gists{/gist_id}","starred_url":"https://api.github.com/users/Fantomas42/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/Fantomas42/subscriptions","organizations_url":"https://api.github.com/users/Fantomas42/orgs","repos_url":"https://api.github.com/users/Fantomas42/repos","events_url":"https://api.github.com/users/Fantomas42/events{/privacy}","received_events_url":"https://api.github.com/users/Fantomas42/received_events","type":"User","site_admin":false},"created_at":"2015-06-15T09:39:36Z","updated_at":"2015-06-15T09:39:36Z","body":"Thanks for your work !\r\nA new release has been published on Pypi."}}