Skip to content
This repository was archived by the owner on Jun 8, 2019. It is now read-only.

Commit c1bfa72

Browse files
committed
pass path as it is
1 parent 0d4947e commit c1bfa72

File tree

1 file changed

+1
-10
lines changed

1 file changed

+1
-10
lines changed

gitea/gitea.go

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -57,20 +57,11 @@ func (c *Client) SetSudo(sudo string) {
5757
}
5858

5959
func (c *Client) doRequest(method, path string, header http.Header, body interface{}) (*http.Response, error) {
60-
u, err := url.Parse(c.url)
60+
u, err := url.Parse(c.url + "/api/v1" + path)
6161
if err != nil {
6262
return nil, err
6363
}
6464

65-
unescaped, err := url.PathUnescape(path)
66-
if err != nil {
67-
return nil, err
68-
}
69-
70-
// Set the encoded path data
71-
u.RawPath = "/api/v1" + path
72-
u.Path = "/api/v1" + unescaped
73-
7465
if method == "GET" {
7566
if body != nil {
7667
q, err := query.Values(body)

0 commit comments

Comments
 (0)