Commit Graph

17 Commits

Author SHA1 Message Date
Ben Harris c12dfb21be save defaultBranch we looked up for the timestamp lookup 2022-07-20 12:41:26 -04:00
~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
Ben Harris 1955acce05 parse url correctly? 2022-05-26 15:23:27 -04:00
Ben Harris 54946a45d7 gitea api logging 2022-05-26 13:57:36 -04:00
Ben Harris 3e04412113 add some more logging so i can see where stuff is failing 2022-05-26 11:33:17 -04:00
6543 6f12f2a8e4
fix bug 2022-05-15 22:36:12 +02:00
6543 4267d54a63 refactor (2) (#34)
move forward with refactoring:
 - initial implementation of a smal "gitea client for fasthttp"
 - move constant into const.go

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/34
Reviewed-by: Otto Richter <otto@codeberg.org>
2022-04-20 23:42:01 +02:00
6543 f5d0dc7447 Add pipeline (#65)
close #54

Co-authored-by: 6543 <6543@obermui.de>
Reviewed-on: https://codeberg.org/Codeberg/pages-server/pulls/65
Reviewed-by: Andreas Shimokawa <ashimokawa@noreply.codeberg.org>
2022-03-27 21:54:06 +02:00
6543 6af6523a0f
code format 2021-12-09 20:16:43 +01:00
6543 5aae7c882f
Merge branch 'master' into refactoring 2021-12-05 22:50:46 +01:00
6543 a7bb3448a4
move more args of Upstream() to upstream Options 2021-12-05 19:53:23 +01:00
6543 e85f21ed2e
some renames 2021-12-05 18:20:38 +01:00
6543 77e39b2213
unexport if posible 2021-12-05 16:24:26 +01:00
6543 e6198e4ddd
start refactor Upstream func 2021-12-05 15:59:43 +01:00
6543 de4706bf58
rm 2rm 2021-12-05 15:53:46 +01:00
6543 ccada3e6df
split cert func to related packages 2021-12-05 15:21:05 +01:00
6543 38426c26db
move upstream into own package 2021-12-05 14:48:52 +01:00