{"action":"created","issue":{"url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/162","labels_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/162/labels{/name}","comments_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/162/comments","events_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/162/events","html_url":"https://github.com/nickel-org/nickel.rs/issues/162","id":60022858,"number":162,"title":"Static file MIME type inferred incorrectly for 404s","user":{"login":"ninjabear","id":5323141,"avatar_url":"https://avatars.githubusercontent.com/u/5323141?v=3","gravatar_id":"","url":"https://api.github.com/users/ninjabear","html_url":"https://github.com/ninjabear","followers_url":"https://api.github.com/users/ninjabear/followers","following_url":"https://api.github.com/users/ninjabear/following{/other_user}","gists_url":"https://api.github.com/users/ninjabear/gists{/gist_id}","starred_url":"https://api.github.com/users/ninjabear/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/ninjabear/subscriptions","organizations_url":"https://api.github.com/users/ninjabear/orgs","repos_url":"https://api.github.com/users/ninjabear/repos","events_url":"https://api.github.com/users/ninjabear/events{/privacy}","received_events_url":"https://api.github.com/users/ninjabear/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":7,"created_at":"2015-03-05T21:57:56Z","updated_at":"2015-03-11T17:18:21Z","closed_at":null,"body":"As I alluded to before without explaining properly, what I mean is it looks like the mime type is inferred from the file extension, but this should be overridden on certain events. \r\n\r\nIf you load up nickel-bootstrap and put in /images/afilethatdoesntexist.jpg instead of getting a 404 I get a firefox (YMMV) \"image cannot be displayed because it contains errors\" response. \r\n\r\nAbove is all speculation so far - it could be something else entirely. It could also be a hyper issue, depending on where the handover is. \r\n\r\nInterestingly this doesn't occur in chrome, which displays the correct \"file not found\" response."},"comment":{"url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/comments/78310316","html_url":"https://github.com/nickel-org/nickel.rs/issues/162#issuecomment-78310316","issue_url":"https://api.github.com/repos/nickel-org/nickel.rs/issues/162","id":78310316,"user":{"login":"SimonPersson","id":606973,"avatar_url":"https://avatars.githubusercontent.com/u/606973?v=3","gravatar_id":"","url":"https://api.github.com/users/SimonPersson","html_url":"https://github.com/SimonPersson","followers_url":"https://api.github.com/users/SimonPersson/followers","following_url":"https://api.github.com/users/SimonPersson/following{/other_user}","gists_url":"https://api.github.com/users/SimonPersson/gists{/gist_id}","starred_url":"https://api.github.com/users/SimonPersson/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SimonPersson/subscriptions","organizations_url":"https://api.github.com/users/SimonPersson/orgs","repos_url":"https://api.github.com/users/SimonPersson/repos","events_url":"https://api.github.com/users/SimonPersson/events{/privacy}","received_events_url":"https://api.github.com/users/SimonPersson/received_events","type":"User","site_admin":false},"created_at":"2015-03-11T17:18:21Z","updated_at":"2015-03-11T17:18:21Z","body":"Yeah, a default mime should do it.\r\n\r\nI think there might be something else broken too. This code just causes a deadlock if `path` is not valid:\r\n```\r\nlet response = try!(res.send_file(&*path));\r\nOk(Halt(response))\r\n```\r\nGDB tells me that it hangs on a `thread.join()` somewhere. Nothing is received on the client side, not even headers. I'm not sure that is related to the hyper bug, although I really don't know :)"}}