0xtrr / cherry-server

A media server implementing the Blossom protocol.
3 stars 1 forks source link

HEAD request support for /upload? #9

Open laanwj opened 2 days ago

laanwj commented 2 days ago

Lack of HTTP HEAD request support for /upload resulted in a (probably temporary) incompatibility with nostrudel:

https://next.nostrudel.ninja/#/n/nevent1qvzqqqqqqypzqz4rnedwlxdqqznmmv95ny2cey4uf23qldjexxjj6p2mt6mdlaecqy28wumn8ghj7mn0wd68ytncxpnzummjvuhszythwden5te0dehhxarj9emkjmn99uqzqqqqm89gmszmzqf6gc0wxxhm6pr2ke4lukkkdsw87cxqtn7zg4xvpqk37r

i don't think it's required by the spec but as this was unexpected behavior in practice, it might make sense to implement it.

Edit: updated to be more specific, there is actually HEAD support, but only for hashes, not for that endpoint

0xtrr commented 1 day ago

Been a bit busy IRL lately so haven't had time to look into the new BUDs and BUD-06 yet. I'm currently working on upgrading dependencies and adding a bunch of unit tests to the project but I'll try to take a look at the HEAD /upload request soon since it breaks compatibility with nostrudel. Happy to review PRs as well if someone fixes it in the meantime!