Enhance joinURL and return error on gitea client on start instead while running #88

Merged
6543 merged 8 commits from advanced-joinURL into main 4 months ago
6543 commented 4 months ago
Collaborator
There is no content yet.
6543 added 1 commit 4 months ago
6543 added this to the v3.0 milestone 4 months ago
6543 added 1 commit 4 months ago
c00fb87ae9 more coverage
6543 added 1 commit 4 months ago
a9f63de328 well we have to copy...
6543 changed title from WIP: Enhance joinURL and return error on gitea client on start instead while running to Enhance joinURL and return error on gitea client on start instead while running 4 months ago
6543 requested review from crystal 4 months ago
crapStone approved these changes 4 months ago

It looks like adding the result of path.Join to b.Path is causing GiteaRawContent to break because it converts ?ref= to %!F(MISSING)ref=. That's why the redirect test is failing, GiteaRawContent is producing a bad request when it looks for the .domains file.

It looks like adding the result of `path.Join` to `b.Path` is causing `GiteaRawContent` to break because it converts `?ref=` to `%!F(MISSING)ref=`. That's why the redirect test is failing, `GiteaRawContent` is producing a bad request when it looks for the `.domains` file.
Poster
Collaborator

noticed :D good to finaly have integration tests I would say

noticed :D good to finaly have integration tests I would say
6543 changed title from Enhance joinURL and return error on gitea client on start instead while running to WIP: Enhance joinURL and return error on gitea client on start instead while running 4 months ago
6543 added 1 commit 4 months ago
ba42ca893c Merge branch 'main' into advanced-joinURL
crapStone requested changes 4 months ago
Dismissed
type Client struct {
giteaRoot string
giteaRoot *url.URL
Collaborator

What is the benefit of changing the string to URL when fasthttp uses strings for URLs anyway?

What is the benefit of changing the string to URL when fasthttp uses strings for URLs anyway?
Poster
Collaborator

we do have to parce it once and if there is an issue, pages server will fail srtaight on start and not have broken websites

we do have to parce it once and if there is an issue, pages server will fail srtaight on start and not have broken websites
Poster
Collaborator

the main reason is, that i like to utilize the url.Parse() func to alter and build query urls

the main reason is, that i like to utilize the url.Parse() func to alter and build query urls
Poster
Collaborator

changed as implementation of joinPath changed

changed as implementation of joinPath changed
6543 marked this conversation as resolved
6543 added 3 commits 4 months ago
6543 changed title from WIP: Enhance joinURL and return error on gitea client on start instead while running to Enhance joinURL and return error on gitea client on start instead while running 4 months ago
6543 requested review from crapStone 4 months ago

fwiw the net/url package is getting a JoinPath function in Go 1.19 which can probably be used here instead, but for now we'll need this.

https://github.com/golang/go/issues/47005

fwiw the `net/url` package is getting a `JoinPath` function in Go 1.19 which can probably be used here instead, but for now we'll need this. https://github.com/golang/go/issues/47005
crystal approved these changes 4 months ago
Poster
Collaborator

nice to know, I'll add a todo mark

nice to know, I'll add a todo mark
6543 added 1 commit 4 months ago
565aba63ee add todo note for golang version bump
6543 removed review request for crapStone 4 months ago
6543 dismissed crapStone’s review 4 months ago
Reason:

outdated

Poster
Collaborator

ok that'S an interesting bug within gitea.

if you lgtm and the reject. afterwards you dismiss the review you have a lgtm again :O

ok that'S an interesting bug within gitea. if you lgtm and the reject. afterwards you dismiss the review you have a lgtm again :O
6543 merged commit cc32bab31f into main 4 months ago
6543 deleted branch advanced-joinURL 4 months ago

Reviewers

crapStone approved these changes 4 months ago
crystal approved these changes 4 months ago
ci/woodpecker/pr/woodpecker Pipeline was successful
The pull request has been merged as cc32bab31f.
Sign in to join this conversation.
Loading…
There is no content yet.