Skip to content

NewWithApiTokenAndClient method doesn't work anymore and always return 500 #76

Description

@mfocuz

Due to hub-api-client doesn't have path normalization, it sends non-normalizeds path to sever and sever doesn't handle it as well.

Out endpoint API variable is http://blackducksoftware.com/ (pay attention on last slash "/")
and method NewWithApiTokenAndClient has the following concat:
url := baseURL + "/api/tokens/authenticate"

Due to above, final request is:
POST //api/tokens/authenticate HTTP/1.1
Host: blackducksoftware.com

and response is
"status":500,
"error":"Internal Server Error",
"message":"The request was rejected because the URL was not normalized.",
"path":"//api/tokens/authenticate"

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions