You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
BinaryHTTPReceiver should remove datacontentencoding property after decoding #284
Describe the Bug
When the BinaryHTTPReceiver accepts an incoming event, one of the first things it does is check to see if the event has its data encoded, by looking for the CloudEvent#datacontentencoding property. If the data is encoded, and the content type is application/json, then it will parse the data so that to the user, it ultimately is in Object form.
However, when validating the event, the validator checks to see if the datacontentencoding is set and if so, will throw a ValidationError if it's not a string or Buffer.
This is only relevant for v0.3 events, since datacontentencoding is not part of the 1.0 specification.
Activity
lance commentedon Jul 29, 2020
Note that this is also an issue for v03 structured events.
fix: ensure that data encoded as base64 is parsed as an object
fix: ensure that data encoded as base64 is parsed as an object (#285)