{"action":"created","issue":{"url":"https://api.github.com/repos/libgraviton/graviton/issues/304","labels_url":"https://api.github.com/repos/libgraviton/graviton/issues/304/labels{/name}","comments_url":"https://api.github.com/repos/libgraviton/graviton/issues/304/comments","events_url":"https://api.github.com/repos/libgraviton/graviton/issues/304/events","html_url":"https://github.com/libgraviton/graviton/pull/304","id":111355958,"number":304,"title":"fix HEAD handling","user":{"login":"narcoticfresh","id":245441,"avatar_url":"https://avatars.githubusercontent.com/u/245441?v=3","gravatar_id":"","url":"https://api.github.com/users/narcoticfresh","html_url":"https://github.com/narcoticfresh","followers_url":"https://api.github.com/users/narcoticfresh/followers","following_url":"https://api.github.com/users/narcoticfresh/following{/other_user}","gists_url":"https://api.github.com/users/narcoticfresh/gists{/gist_id}","starred_url":"https://api.github.com/users/narcoticfresh/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/narcoticfresh/subscriptions","organizations_url":"https://api.github.com/users/narcoticfresh/orgs","repos_url":"https://api.github.com/users/narcoticfresh/repos","events_url":"https://api.github.com/users/narcoticfresh/events{/privacy}","received_events_url":"https://api.github.com/users/narcoticfresh/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-10-14T09:13:22Z","updated_at":"2015-10-15T09:43:51Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/libgraviton/graviton/pulls/304","html_url":"https://github.com/libgraviton/graviton/pull/304","diff_url":"https://github.com/libgraviton/graviton/pull/304.diff","patch_url":"https://github.com/libgraviton/graviton/pull/304.patch"},"body":"i know, we all didn't want to support HEAD requests in the first place ;-/\r\nbut as it turns out, some browsers make them and there is no way to disable that.\r\n\r\nGraviton currently handles them in a rather inconsistent way - it answers it with an 2** status code, but actually processes the data request in `allAction()` in `RestController` but then has an empty response body. I've seen that it gets data by the delayed answer, the presence of the `x-total-count` header in the response and dev.log output.\r\n\r\nthis PR handles HEAD the same as we handle OPTIONS. this suffices as the only thing the client (m$ie) is looking for in the HEAD response is the presence of a `Content-Type` header (afaik), which we provide in the OPTIONS request."},"comment":{"url":"https://api.github.com/repos/libgraviton/graviton/issues/comments/148336048","html_url":"https://github.com/libgraviton/graviton/pull/304#issuecomment-148336048","issue_url":"https://api.github.com/repos/libgraviton/graviton/issues/304","id":148336048,"user":{"login":"hairmare","id":116588,"avatar_url":"https://avatars.githubusercontent.com/u/116588?v=3","gravatar_id":"","url":"https://api.github.com/users/hairmare","html_url":"https://github.com/hairmare","followers_url":"https://api.github.com/users/hairmare/followers","following_url":"https://api.github.com/users/hairmare/following{/other_user}","gists_url":"https://api.github.com/users/hairmare/gists{/gist_id}","starred_url":"https://api.github.com/users/hairmare/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/hairmare/subscriptions","organizations_url":"https://api.github.com/users/hairmare/orgs","repos_url":"https://api.github.com/users/hairmare/repos","events_url":"https://api.github.com/users/hairmare/events{/privacy}","received_events_url":"https://api.github.com/users/hairmare/received_events","type":"User","site_admin":false},"created_at":"2015-10-15T09:43:51Z","updated_at":"2015-10-15T09:43:51Z","body":"Thanks for looking into this."}}