Skip to content
This repository was archived by the owner on Dec 10, 2024. It is now read-only.
This repository was archived by the owner on Dec 10, 2024. It is now read-only.

Issue with getting raw files #1843

@nchursin

Description

@nchursin

Hi

I have an issue getting a raw file from a repo. I found the source, but not sure how to fix this.

In GetRawFile there's a URL construction like this:

u := fmt.Sprintf(
      "projects/%s/repository/files/%s",
      PathEscape(project),
      PathEscape(fileName),
)

req, err := s.client.NewRequest(http.MethodGet, u, opt, options)

But NewRequest unescapes the u back to regular URL, which causes 404 in gitlab.

unescaped, err := url.PathUnescape(path)

Any ideas how to fix this, without breaking all the other stuff? :)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions