Skip to content

Bug? Authorization header format difference #67

@wesleyjellis

Description

@wesleyjellis

I was upgrading Faraday from 1 to 2 and an HTTP mock started failing for requests sent by this gem because of a difference in the format of the HTTP Authorization header. The difference:

Authorization: Token xxxxxxx

vs

Authorization: Token token="xxxxxx"

I did some testing and the pagerduty REST API accepts both formats, although their documentation actually suggests a third form

Authorization: Token token=xxxxx

Now according to the HTTP semantics RFC 9110, the second and third forms are equivalent.

I'm not sure if this counts as a bug since it's working, but I do wonder if there's some risk that pagerduty changes what their API accepts at some future date and so it would be safest to use the format described in their documentation

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions