TwitchLib / TwitchLib.EventSub.Webhooks

Provides an easy way to setup a Twitch EventSub Webhooks Server
6 stars 7 forks source link

Case-sensitive dictionary access does not allow testing with twitch-cli #1

Closed mkosler closed 2 years ago

mkosler commented 2 years ago

I started to work on an application that will use Twitch EventSub, and Twitch provides a handy tool called the twitch-cli to simulate EventSub triggers. However, when twitch-cli creates the necessary headers for EventSub event, it creates them in all lowercase:

image

This causes failures even within the example application in this repository, notably always triggering a Missing_Header error.

Following the Twitch EventSub docs, they recommend always converting any check to lower case prior to checking the headers.

Syzuna commented 2 years ago

Hey, thanks for reporting that. I tested the current implementation with the cli myself and it always sent cased headers, so that comes as a surprise to me. Will look into it

Syzuna commented 2 years ago

Version 1.1.1 should fix that and will now use OrdinalIgnoreCase for the dictionary key comparision. If you still see issues pls report back otherwise feel free to close the issue :)