{"action":"closed","issue":{"url":"https://api.github.com/repos/padrino/padrino-framework/issues/1943","labels_url":"https://api.github.com/repos/padrino/padrino-framework/issues/1943/labels{/name}","comments_url":"https://api.github.com/repos/padrino/padrino-framework/issues/1943/comments","events_url":"https://api.github.com/repos/padrino/padrino-framework/issues/1943/events","html_url":"https://github.com/padrino/padrino-framework/issues/1943","id":96963765,"number":1943,"title":"Padrino return 404 when \"provides\" is set and 'Accept' header has only '*/*'.","user":{"login":"tunepolo","id":12091114,"avatar_url":"https://avatars.githubusercontent.com/u/12091114?v=3","gravatar_id":"","url":"https://api.github.com/users/tunepolo","html_url":"https://github.com/tunepolo","followers_url":"https://api.github.com/users/tunepolo/followers","following_url":"https://api.github.com/users/tunepolo/following{/other_user}","gists_url":"https://api.github.com/users/tunepolo/gists{/gist_id}","starred_url":"https://api.github.com/users/tunepolo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/tunepolo/subscriptions","organizations_url":"https://api.github.com/users/tunepolo/orgs","repos_url":"https://api.github.com/users/tunepolo/repos","events_url":"https://api.github.com/users/tunepolo/events{/privacy}","received_events_url":"https://api.github.com/users/tunepolo/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-07-24T04:37:18Z","updated_at":"2015-07-27T08:38:13Z","closed_at":"2015-07-27T08:38:13Z","body":"I find strange behaviour in padrino.\r\nIt seems router bugs.\r\n\r\n### Environment\r\n\r\n#### Windows\r\n\r\n```bat\r\n% ruby -v\r\nruby 2.1.6p336 (2015-04-13 revision 50298) [i386-mingw32]\r\n```\r\n\r\n#### Linux\r\n\r\n```bash\r\n$ ruby -v\r\nruby 2.1.6p336 (2015-04-13 revision 50298) [x86_64-linux]\r\n```\r\n\r\n### Source Code\r\n\r\n```ruby\r\nget :text, provides: :text do\r\n  content_type 'text/plain'\r\n  'hello world'\r\nend\r\n\r\nget :image, provides: :jpg do\r\n  content_type :jpg\r\n  filepath =  File.join(Padrino.root, 'files/padrino.jpg')\r\n  File.binread(filepath)\r\nend\r\n```\r\n\r\nWhole source code is accesible from [tunepolo/padrino_router_bugs](https://github.com/tunepolo/padrino_router_bugs).\r\n\r\n```bash\r\n$ git clone https://github.com/tunepolo/padrino_router_bugs\r\n$ bundle install\r\n$ ruby bin/image_server -h 0.0.0.0\r\n```\r\n\r\n### Symptom\r\n\r\nNote that '172.23.105.165' is my PC's IP.\r\nThe response difference is caused by browser's 'Accept' header.\r\n\r\n* Google Chrome : ```text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8```\r\n* Internet Explorer(localhost) : ```text/html, application/xhtml+xml, */*```\r\n* Internet Explorer(IP address) : ```*/*```\r\n\r\n[Google Chrome]\r\n\r\n| URL | Success |\r\n|-----|---------|\r\n| http://localhost:3000/text | ○ |\r\n| http://localhost:3000/image | ○ |\r\n| http://172.23.105.165:3000/text | ○ |\r\n| http://172.23.105.165:3000/image | ○ |\r\n\r\n[Internet Explorer]\r\n\r\n| URL | Success |\r\n|-----|---------|\r\n| http://localhost:3000/text | ○ |\r\n| http://localhost:3000/image | ○ |\r\n| http://172.23.105.165:3000/text | × |\r\n| http://172.23.105.165:3000/image | × |\r\n "}}