Most of the time users will be using the Receiver in some sort of web framework that automatically sanitizes headers before user code accesses them. That's not always the case, though. Because the Receiver.acccept() method doesn't sanitize, it won't be able to detect a structured event if the content type header is Content-Type instead of content-type.
https://github.com/cloudevents/sdk-javascript/blob/master/src/transport/receiver.ts#L62