sylabs / scs-library-client

Go client for the Singularity Container Services (SCS) Container Library Service

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

BaseURL Path Handling Bug

tri-adam opened this issue · comments

When a Client is created with a path component (ex. https://example.com/path), the path component ends up being ignored when building up request URLs.

The problem originates in (*Client).newRequest, which calls (*url.URL).ResolveReference to construct a request URI to BaseURL/path. When the path parameter begins with a /, it is treated as an absolute path and thus any path component of the BaseURL is ignored.