Nothing is appending a charset in my code. The Twitch CLI is doing that.
If I construct the response with this C code:
char *challenge = get_challenge_from_request();
char response[256] = {0};
memcpy(response, "HTTP/1.1 200 OK\r\nContent-Length: 36\r\nContent-Type: text/html\r\n\r\n", 64);
memcpy(response + 64, challenge, 36);
write(socketfd, response, strlen(response));
I get this response:
$ twitch event verify-subscription subscribe -F https://xxxxxx/test -s dfsion43jdghjyt5mry
✔ Valid response. Received challenge 7087e388-ff86-e86e-2763-dc3beb3aa02c in body
✗ Invalid content-type header. Received type text/html; charset=utf-8
✔ Valid status code. Received status 200
There is no charset being set anywhere in my code.