haskell/HTTP — pull request #59 by dermesser (2014-04-24 11:41:43+00:00)
Title: IPv6 compatibility

I replaced the gethostbyname() function used previously by the modern getaddrinfo() function. (The man page of former function marks it as obsolete).

The intended main effect is the support of IPv6 which was not enabled until now. I did some tests and sendHTTP, openTCPConnection work. I believe that the other function will then work, too, although i'm not 100% sure.

I needed to remove the withSocket "guard" because we know the address family only *after* doing the getaddrinfo() call. However, exceptions are still caught and the socket is closed if something goes wrong.