jhermsmeier / node-http-link-header

Parse & format HTTP link headers according to RFC 8288
MIT License
39 stars 12 forks source link

Fix case insensitive relation type comparison for has and get #31

Closed csarven closed 9 months ago

csarven commented 9 months ago

Case-insensitive comparison is required as per RFC8288, Sections 2.1.1, 2.1.2 for relation types.

While case insensitive comparison is working as intended for the retrieval shorthand (rel), it was not for lookup (has) or retrieving (get). This PR fixes that and includes the tests.

jhermsmeier commented 9 months ago

Good catch, thanks! Published in http-link-header@1.1.2

csarven commented 9 months ago

Thanks for the quick review! I'm glad the minor code I contributed at 3-4 in the morning turned out okay... while I was in a rabbit hole trying to replace the homebaked Link header parser in dokieli :)

jhermsmeier commented 9 months ago

Wow, what a massive project! Wasn't aware something like it existed, going to have to play around with it :)