-
Notifications
You must be signed in to change notification settings - Fork 73
Closed
Closed
Copy link
Labels
module/libRelated to the main source codeRelated to the main source codemodule/transport/httpIssues related to the HTTP transport protocol implementationIssues related to the HTTP transport protocol implementationspec/0.3Support for spec v0.3Support for spec v0.3type/bugSomething isn't workingSomething isn't working
Description
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.
Steps to Reproduce
- pull in the changes from chore: Update examples to use latest sdk changes #282
- run the example with "A Binary One with Base 64 Encoding" from the example README
- watch it fail
Expected Behavior
The event should be accepted, created and validated without error.
Metadata
Metadata
Assignees
Labels
module/libRelated to the main source codeRelated to the main source codemodule/transport/httpIssues related to the HTTP transport protocol implementationIssues related to the HTTP transport protocol implementationspec/0.3Support for spec v0.3Support for spec v0.3type/bugSomething isn't workingSomething isn't working