dizzyd / mcdex

Minecraft Modpack Management
Apache License 2.0
74 stars 8 forks source link

Modify http client Dial() func to handle ipv6 #47

Closed ghost closed 5 years ago

ghost commented 5 years ago

I started getting this error running mcdex pack.install:

2019/06/10 20:27:43 failed to resolve project 262692: 
  HTTP error on https://minecraft.curseforge.com/projects/262692?cookieTest=1: 
  Get https://minecraft.curseforge.com/projects/262692?cookieTest=1: 
  dial tcp: address 2606:4700::6813:9284:443: too many colons in address

It looked like I was getting ipv6 addresses. Some poking around and I found this which suggested to put the address in brackets. Looks like it fixes the problem!

ghost commented 5 years ago

I've modified the code to only add brackets if there's a colon present :+1: