Closed dpotapov closed 2 years ago
E.g. this call fails with 404 error:
branches, _, err := gr.Projects.ListBranches("my/project/name", &gerrit.BranchOptions{})
it seems it keeps generating unescaped URLs like http://mygerritserver/r/a/projects/my/project/name/branches/ which are not valid for Gerrit.
http://mygerritserver/r/a/projects/my/project/name/branches/
When debugging the code, I found that the function buildURLForRequest(urlStr string) (string, error) unescapes the project part.
buildURLForRequest(urlStr string) (string, error)
I've figured it out. My gerrit server redirects all http requests with extra /r prefix in the URL and while doing that it unescapes the properly escaped path.
/r
E.g. this call fails with 404 error:
it seems it keeps generating unescaped URLs like
http://mygerritserver/r/a/projects/my/project/name/branches/
which are not valid for Gerrit.When debugging the code, I found that the function
buildURLForRequest(urlStr string) (string, error)
unescapes the project part.