Fix URL building for default repo branch API
Using the base URL in path.Join caused it to remove the two slashes (because /////tmp == /tmp): `https:/tildegit.org/api/v1/repos/owner/name` Then, using that in URL.Parse causes it to see a `https:` scheme, and the / right afterwards means "start a path here", not a hostname, because hostnames begin with two slashes. That's a valid URL, with no hostname. Then it gets turned back into a string: `https:///tildegit.org/api/v1/repos/owner/name` That's another way of expressing the same URL with no hostname: //<empty hostname>/<path>. curl, Firefox and Chromium all fix the triple slash automatically, but fasthttp doesn't, and it tries to look up the empty string as a DNS host!pull/1/head
parent
1955acce05
commit
d84955e6cd
Loading…
Reference in New Issue