Skip to content

Should Blossom endpoints return 401 instead of 400 when the request lacks an Authorization header? #25

@tealeaf-dot-dev

Description

@tealeaf-dot-dev

E.g. the HEAD /upload endpoint returns 400

blossomError(w, err.Error(), 400)

BUD 06 ...

"If the server requires authorization to upload it may respond with the 401 status code"

Returning 400 is causing uploads to fail between relays that use Khatru (e.g. Haven) and clients that use blossom-client-sdk (e.g. noStrudel) ... because blossom-client-sdk never sends an Authorization header to HEAD /upload and only sends one to PUT /upload if the response from HEAD /upload is 401

cc @barrydeen @hzrd149

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