{"action":"created","issue":{"url":"https://api.github.com/repos/elixir-lang/plug/issues/177","labels_url":"https://api.github.com/repos/elixir-lang/plug/issues/177/labels{/name}","comments_url":"https://api.github.com/repos/elixir-lang/plug/issues/177/comments","events_url":"https://api.github.com/repos/elixir-lang/plug/issues/177/events","html_url":"https://github.com/elixir-lang/plug/issues/177","id":56220816,"number":177,"title":"Plug.Static/Chrome strange cache issue","user":{"login":"tmjoen","id":10501945,"avatar_url":"https://avatars.githubusercontent.com/u/10501945?v=3","gravatar_id":"","url":"https://api.github.com/users/tmjoen","html_url":"https://github.com/tmjoen","followers_url":"https://api.github.com/users/tmjoen/followers","following_url":"https://api.github.com/users/tmjoen/following{/other_user}","gists_url":"https://api.github.com/users/tmjoen/gists{/gist_id}","starred_url":"https://api.github.com/users/tmjoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmjoen/subscriptions","organizations_url":"https://api.github.com/users/tmjoen/orgs","repos_url":"https://api.github.com/users/tmjoen/repos","events_url":"https://api.github.com/users/tmjoen/events{/privacy}","received_events_url":"https://api.github.com/users/tmjoen/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":15,"created_at":"2015-02-02T10:45:19Z","updated_at":"2015-02-03T08:13:04Z","closed_at":"2015-02-03T08:13:04Z","body":"This one is kind of hard to explain, and I'm not even sure it's a Plug problem. Just putting it here for some thoughts. \r\n\r\nHere is a gfy link:\r\nhttp://gfycat.com/LimpCorruptBelugawhale\r\n\r\nWhen I switch off caching in Chrome, it works again.\r\n\r\nHere's some data from the requests/responses:\r\nhttps://gist.github.com/tmjoen/523a326f3dc581a1bb04\r\n\r\n*Doing some debugging in static.ex shows that `:prim_file.read_file_info(path)` sometimes return `:enoent` which in turn serves a 404.*\r\n\r\nFirst request on a cleared cache is 200, then it alternates between 304 and 404.\r\n\r\nThe error only happens with Chrome. Not with Safari or Firefox. Tested current Chrome 40.0.2214.93 (64-bit) and Canary. I could only reproduce when I have several JS and CSS resources on the page that 404s due to a wrong URL. The frequency of 404s seems random.\r\n\r\nPlug HEAD.\r\n\r\nI also tried ref:bbfe321a79668a8fa085fd4ff256319d4fc490a9 (before all the cache changes to Plug.Static) and the problem is there as well (except it only returns 200 or 404, since there are no cached results returned as 304)\r\n\r\nIs this a Chrome bug, or is there some cache miscommunication between Plug.Static and Chrome?"},"comment":{"url":"https://api.github.com/repos/elixir-lang/plug/issues/comments/72610376","html_url":"https://github.com/elixir-lang/plug/issues/177#issuecomment-72610376","issue_url":"https://api.github.com/repos/elixir-lang/plug/issues/177","id":72610376,"user":{"login":"tmjoen","id":10501945,"avatar_url":"https://avatars.githubusercontent.com/u/10501945?v=3","gravatar_id":"","url":"https://api.github.com/users/tmjoen","html_url":"https://github.com/tmjoen","followers_url":"https://api.github.com/users/tmjoen/followers","following_url":"https://api.github.com/users/tmjoen/following{/other_user}","gists_url":"https://api.github.com/users/tmjoen/gists{/gist_id}","starred_url":"https://api.github.com/users/tmjoen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tmjoen/subscriptions","organizations_url":"https://api.github.com/users/tmjoen/orgs","repos_url":"https://api.github.com/users/tmjoen/repos","events_url":"https://api.github.com/users/tmjoen/events{/privacy}","received_events_url":"https://api.github.com/users/tmjoen/received_events","type":"User","site_admin":false},"created_at":"2015-02-03T08:13:04Z","updated_at":"2015-02-03T08:13:04Z","body":"Perfect, works great. Thanks!"}}