{"action":"created","issue":{"url":"https://api.github.com/repos/lostisland/faraday/issues/701","repository_url":"https://api.github.com/repos/lostisland/faraday","labels_url":"https://api.github.com/repos/lostisland/faraday/issues/701/labels{/name}","comments_url":"https://api.github.com/repos/lostisland/faraday/issues/701/comments","events_url":"https://api.github.com/repos/lostisland/faraday/issues/701/events","html_url":"https://github.com/lostisland/faraday/issues/701","id":234838818,"number":701,"title":"no_proxy does not work when using Faraday.get","user":{"login":"JasonBarnabe","id":583995,"avatar_url":"https://avatars0.githubusercontent.com/u/583995?v=3","gravatar_id":"","url":"https://api.github.com/users/JasonBarnabe","html_url":"https://github.com/JasonBarnabe","followers_url":"https://api.github.com/users/JasonBarnabe/followers","following_url":"https://api.github.com/users/JasonBarnabe/following{/other_user}","gists_url":"https://api.github.com/users/JasonBarnabe/gists{/gist_id}","starred_url":"https://api.github.com/users/JasonBarnabe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/JasonBarnabe/subscriptions","organizations_url":"https://api.github.com/users/JasonBarnabe/orgs","repos_url":"https://api.github.com/users/JasonBarnabe/repos","events_url":"https://api.github.com/users/JasonBarnabe/events{/privacy}","received_events_url":"https://api.github.com/users/JasonBarnabe/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2017-06-09T14:10:30Z","updated_at":"2017-06-09T14:18:17Z","closed_at":null,"body":"In this test, 404 is the expected response. 503 is the response from the proxy.\r\n```\r\n[web@CDLXUTL301 Canadadrugs-Build]$ bundle show faraday\r\n/home/web/.rvm/gems/ruby-2.3.3@canadadrugs/gems/faraday-0.12.1\r\n[web@CDLXUTL301 Canadadrugs-Build]$ RAILS_ENV=test rails console\r\nLoading test environment (Rails 5.0.3)\r\n[1] pry(main)> ENV['http_proxy']\r\n=> \"http://lxgw103.candrugcorp.net:3128\"\r\n[2] pry(main)> ENV['no_proxy']\r\n=> \"localhost,127.0.0.1,172.22.24.151,cdlxutl301.candrugcorp.net\"\r\n[3] pry(main)> Faraday.get('http://localhost:8983/select?wt=json&q=*%3A*').status\r\nno_proxy is unsupported\r\n=> 503\r\n[4] pry(main)> Faraday.new(url: 'http://localhost:8983').get('http://localhost:8983/select?wt=json&q=*%3A*').status\r\n=> 404\r\n```"},"comment":{"url":"https://api.github.com/repos/lostisland/faraday/issues/comments/307401441","html_url":"https://github.com/lostisland/faraday/issues/701#issuecomment-307401441","issue_url":"https://api.github.com/repos/lostisland/faraday/issues/701","id":307401441,"user":{"login":"iMacTia","id":2527520,"avatar_url":"https://avatars2.githubusercontent.com/u/2527520?v=3","gravatar_id":"","url":"https://api.github.com/users/iMacTia","html_url":"https://github.com/iMacTia","followers_url":"https://api.github.com/users/iMacTia/followers","following_url":"https://api.github.com/users/iMacTia/following{/other_user}","gists_url":"https://api.github.com/users/iMacTia/gists{/gist_id}","starred_url":"https://api.github.com/users/iMacTia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iMacTia/subscriptions","organizations_url":"https://api.github.com/users/iMacTia/orgs","repos_url":"https://api.github.com/users/iMacTia/repos","events_url":"https://api.github.com/users/iMacTia/events{/privacy}","received_events_url":"https://api.github.com/users/iMacTia/received_events","type":"User","site_admin":false},"created_at":"2017-06-09T14:18:17Z","updated_at":"2017-06-09T14:18:17Z","body":"Hi @JasonBarnabe,\r\n\r\nwhen you call Faraday.get without first initialising the connection, a Faraday::Connection with no url is created to perform the request. This causes the `find_default_proxy` method to be triggered, without no_proxy support (second case I highlighted in #700).\r\nThis was raised (https://github.com/lostisland/faraday/pull/670#pullrequestreview-27191603) and should be fixed in the next small release.\r\nFor the time being, you can make it working using the `Faraday.new` initialiser as you noticed already.\r\n\r\nHowever your code can be simplified a bit:\r\n\r\n```ruby\r\nFaraday.new('http://localhost:8983').get('/select?wt=json&q=*%3A*').status\r\n```"}}
{"actor":{"display_login":"iMacTia"}}