{"action":"created","issue":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/2988","repository_url":"https://api.github.com/repos/kennethreitz/requests","labels_url":"https://api.github.com/repos/kennethreitz/requests/issues/2988/labels{/name}","comments_url":"https://api.github.com/repos/kennethreitz/requests/issues/2988/comments","events_url":"https://api.github.com/repos/kennethreitz/requests/issues/2988/events","html_url":"https://github.com/kennethreitz/requests/issues/2988","id":130289799,"number":2988,"title":"Proxy bypass detection could add delay of ~4.5 seconds to each request ","user":{"login":"schlamar","id":238652,"avatar_url":"https://avatars.githubusercontent.com/u/238652?v=3","gravatar_id":"","url":"https://api.github.com/users/schlamar","html_url":"https://github.com/schlamar","followers_url":"https://api.github.com/users/schlamar/followers","following_url":"https://api.github.com/users/schlamar/following{/other_user}","gists_url":"https://api.github.com/users/schlamar/gists{/gist_id}","starred_url":"https://api.github.com/users/schlamar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/schlamar/subscriptions","organizations_url":"https://api.github.com/users/schlamar/orgs","repos_url":"https://api.github.com/users/schlamar/repos","events_url":"https://api.github.com/users/schlamar/events{/privacy}","received_events_url":"https://api.github.com/users/schlamar/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/kennethreitz/requests/labels/Contributor%20Friendly","name":"Contributor Friendly","color":"0b02e1"},{"url":"https://api.github.com/repos/kennethreitz/requests/labels/Feature%20Request","name":"Feature Request","color":"02e10c"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":18,"created_at":"2016-02-01T08:16:17Z","updated_at":"2016-06-10T06:30:29Z","closed_at":null,"body":"Requests uses `urlib.proxy_bypass` to check if the proxy should be bypassed. This uses `socket.gethostbyaddr` to check if the provided IP matches a hostname entered in the proxy bypass list. In some cases, `gethostbyaddr` takes up to 4.5 seconds on Windows (e.g. when the IP is found but the primary DNS doesn't recognize it).\r\n\r\nCurrently, the proxy bypass detection is done for *every* request, making it pretty unusable when the conditions are met where `gethostbyaddr` is this slow.\r\n\r\nA reasonable solution might be caching the results from `urlib.proxy_bypass`."},"comment":{"url":"https://api.github.com/repos/kennethreitz/requests/issues/comments/225103948","html_url":"https://github.com/kennethreitz/requests/issues/2988#issuecomment-225103948","issue_url":"https://api.github.com/repos/kennethreitz/requests/issues/2988","id":225103948,"user":{"login":"bulkan","id":13985,"avatar_url":"https://avatars.githubusercontent.com/u/13985?v=3","gravatar_id":"","url":"https://api.github.com/users/bulkan","html_url":"https://github.com/bulkan","followers_url":"https://api.github.com/users/bulkan/followers","following_url":"https://api.github.com/users/bulkan/following{/other_user}","gists_url":"https://api.github.com/users/bulkan/gists{/gist_id}","starred_url":"https://api.github.com/users/bulkan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/bulkan/subscriptions","organizations_url":"https://api.github.com/users/bulkan/orgs","repos_url":"https://api.github.com/users/bulkan/repos","events_url":"https://api.github.com/users/bulkan/events{/privacy}","received_events_url":"https://api.github.com/users/bulkan/received_events","type":"User","site_admin":false},"created_at":"2016-06-10T06:30:29Z","updated_at":"2016-06-10T06:30:29Z","body":"Hi @Lukasa, \r\n\r\nWe are using the [requests.Session](https://github.com/bulkan/robotframework-requests/blob/master/src/RequestsLibrary/RequestsKeywords.py#L78)\r\n\r\n[Get request](https://github.com/bulkan/robotframework-requests/blob/master/src/RequestsLibrary/RequestsKeywords.py#L840)"}}
{"actor":{"display_login":"bulkan"}}