{"action":"created","issue":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/3811","repository_url":"https://api.github.com/repos/nim-lang/Nim","labels_url":"https://api.github.com/repos/nim-lang/Nim/issues/3811/labels{/name}","comments_url":"https://api.github.com/repos/nim-lang/Nim/issues/3811/comments","events_url":"https://api.github.com/repos/nim-lang/Nim/issues/3811/events","html_url":"https://github.com/nim-lang/Nim/issues/3811","id":130645519,"number":3811,"title":"IPv6 support for httpclient","user":{"login":"cyisfor","id":1278811,"avatar_url":"https://avatars.githubusercontent.com/u/1278811?v=3","gravatar_id":"","url":"https://api.github.com/users/cyisfor","html_url":"https://github.com/cyisfor","followers_url":"https://api.github.com/users/cyisfor/followers","following_url":"https://api.github.com/users/cyisfor/following{/other_user}","gists_url":"https://api.github.com/users/cyisfor/gists{/gist_id}","starred_url":"https://api.github.com/users/cyisfor/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cyisfor/subscriptions","organizations_url":"https://api.github.com/users/cyisfor/orgs","repos_url":"https://api.github.com/users/cyisfor/repos","events_url":"https://api.github.com/users/cyisfor/events{/privacy}","received_events_url":"https://api.github.com/users/cyisfor/received_events","type":"User","site_admin":false},"labels":[{"id":228777186,"url":"https://api.github.com/repos/nim-lang/Nim/labels/Feedback%20required","name":"Feedback required","color":"009800","default":false},{"id":101971351,"url":"https://api.github.com/repos/nim-lang/Nim/labels/Stdlib","name":"Stdlib","color":"eb6420","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":2,"created_at":"2016-02-02T10:51:58Z","updated_at":"2017-02-02T14:57:42Z","closed_at":null,"body":"So, I wanted to get a file from a website over IPv6. Oops, I guess I can't! Back to python for me!\n\nThis needs to be remedied.\n\nThe ultimate solution would be writing a totally new httpclient library using asyncnet I think, as asynchttpserver to httpserver. It doesn't look like much less effort to start over again, than it would be to fix httpclient, since the \"net\" module already messed up, by beginning with sockets, not with addresses like it should. (you can't create a socket, without first knowing if the address is IPv6 or not.) The reordering of those roles would involve rewriting most of the net module, and some of httpclient. I fiddled with it, and the changes just propagated through the entire net module's code. Or possibly more likely, I was doing something wrong. But it looks like it'd be a mess. Easier to just write an async http client, and forget about that broken net module.\n\nA cludgy hack to enable IPv6 in the current httpclient would be to look up the address, use that for the domain to newSocket, then look up the address again since s.connect() only lets you pass an unresolved address. But of course address look up uses leaky malloc operations, so it isn't exported by net.\n\nYou could always execProcess \"curl\" I guess.\n"},"comment":{"url":"https://api.github.com/repos/nim-lang/Nim/issues/comments/276979893","html_url":"https://github.com/nim-lang/Nim/issues/3811#issuecomment-276979893","issue_url":"https://api.github.com/repos/nim-lang/Nim/issues/3811","id":276979893,"user":{"login":"dom96","id":246651,"avatar_url":"https://avatars.githubusercontent.com/u/246651?v=3","gravatar_id":"","url":"https://api.github.com/users/dom96","html_url":"https://github.com/dom96","followers_url":"https://api.github.com/users/dom96/followers","following_url":"https://api.github.com/users/dom96/following{/other_user}","gists_url":"https://api.github.com/users/dom96/gists{/gist_id}","starred_url":"https://api.github.com/users/dom96/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/dom96/subscriptions","organizations_url":"https://api.github.com/users/dom96/orgs","repos_url":"https://api.github.com/users/dom96/repos","events_url":"https://api.github.com/users/dom96/events{/privacy}","received_events_url":"https://api.github.com/users/dom96/received_events","type":"User","site_admin":false},"created_at":"2017-02-02T14:57:42Z","updated_at":"2017-02-02T14:57:42Z","body":"Yes."}}
{"actor":{"display_login":"dom96"}}