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.