tildepages/server/upstream
~lucidiot d84955e6cd 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!
2022-07-20 16:21:35 +00:00
..
const.go refactor (2) (#34) 2022-04-20 23:42:01 +02:00
domains.go fix bug 2022-05-15 22:36:12 +02:00
gitea.go Fix URL building for default repo branch API 2022-07-20 16:21:35 +00:00
helper.go parse url correctly? 2022-05-26 15:23:27 -04:00
upstream.go parse url correctly? 2022-05-26 15:23:27 -04:00