{"action":"created","issue":{"url":"https://api.github.com/repos/ansible/ansible/issues/12917","labels_url":"https://api.github.com/repos/ansible/ansible/issues/12917/labels{/name}","comments_url":"https://api.github.com/repos/ansible/ansible/issues/12917/comments","events_url":"https://api.github.com/repos/ansible/ansible/issues/12917/events","html_url":"https://github.com/ansible/ansible/issues/12917","id":113446243,"number":12917,"title":"uri module: Both 200 and 304 should be accepted by default","user":{"login":"smalenfant","id":3803592,"avatar_url":"https://avatars.githubusercontent.com/u/3803592?v=3","gravatar_id":"","url":"https://api.github.com/users/smalenfant","html_url":"https://github.com/smalenfant","followers_url":"https://api.github.com/users/smalenfant/followers","following_url":"https://api.github.com/users/smalenfant/following{/other_user}","gists_url":"https://api.github.com/users/smalenfant/gists{/gist_id}","starred_url":"https://api.github.com/users/smalenfant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalenfant/subscriptions","organizations_url":"https://api.github.com/users/smalenfant/orgs","repos_url":"https://api.github.com/users/smalenfant/repos","events_url":"https://api.github.com/users/smalenfant/events{/privacy}","received_events_url":"https://api.github.com/users/smalenfant/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/ansible/ansible/labels/bug_report","name":"bug_report","color":"fbca04"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":5,"created_at":"2015-10-26T20:37:50Z","updated_at":"2015-10-27T02:54:13Z","closed_at":null,"body":"Because the request sent contains an etag header when specifying a file, a status code of \"304, not modified\" should be accepted as default status code. Not sure if this is new in 1.9.4 or not.\r\n\r\nExample..\r\n\r\n```\r\nfailed: [host] => {\"content\": \"\", \"date\": \"Mon, 26 Oct 2015 20:34:15 GMT\", \"etag\": \"\\\"437-52196e0fc5ec0\\\"\", \"failed\": true, \"gid\": 0, \"group\": \"root\", \"mode\": \"0644\", \"owner\": \"root\", \"path\": \"/etc/yum.repos.d/glusterfs-epel.repo\", \"redirected\": false, \"server\": \"Apache/2.4.6 (CentOS) OpenSSL/1.0.1e-fips\", \"size\": 1079, \"state\": \"file\", \"status\": 304, \"uid\": 0}\r\nmsg: Status code was not [200]\r\n```"},"comment":{"url":"https://api.github.com/repos/ansible/ansible/issues/comments/151354123","html_url":"https://github.com/ansible/ansible/issues/12917#issuecomment-151354123","issue_url":"https://api.github.com/repos/ansible/ansible/issues/12917","id":151354123,"user":{"login":"smalenfant","id":3803592,"avatar_url":"https://avatars.githubusercontent.com/u/3803592?v=3","gravatar_id":"","url":"https://api.github.com/users/smalenfant","html_url":"https://github.com/smalenfant","followers_url":"https://api.github.com/users/smalenfant/followers","following_url":"https://api.github.com/users/smalenfant/following{/other_user}","gists_url":"https://api.github.com/users/smalenfant/gists{/gist_id}","starred_url":"https://api.github.com/users/smalenfant/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/smalenfant/subscriptions","organizations_url":"https://api.github.com/users/smalenfant/orgs","repos_url":"https://api.github.com/users/smalenfant/repos","events_url":"https://api.github.com/users/smalenfant/events{/privacy}","received_events_url":"https://api.github.com/users/smalenfant/received_events","type":"User","site_admin":false},"created_at":"2015-10-27T02:54:13Z","updated_at":"2015-10-27T02:54:13Z","body":"So I guess we are saying the same thing. 304 should return changed=False\nand that would result into an \"OK\" message and not a failure.\n\nOn Mon, Oct 26, 2015 at 6:01 PM, Brian Coca <notifications@github.com>\nwrote:\n\n> when a task returns changed=False\n>\n> —\n> Reply to this email directly or view it on GitHub\n> <https://github.com/ansible/ansible/issues/12917#issuecomment-151296664>.\n>\n"}}