Skip to content

Conversation

lance
Copy link
Member

@lance lance commented Jul 29, 2020

Proposed Changes

Parse incoming data as JSON for an event with datacontentencoding set to "base64"
and a content type of application/json or application/cloudevents+json.

Description

The 0.3 specification states that datacontentencoding may be set to base64.
If an incoming event arrives over HTTP with this value set, and the content type
is either application/json or application/cloudevents+json, then we should ensure
that the data is decoded and parsed, and the datacontentencoding property is
removed.

Signed-off-by: Lance Ball lball@redhat.com

The 0.3 specification states that `datacontentencoding` may be set to base64.
If an incoming event arrives over HTTP with this value set, and the content type
is either application/json or application/cloudevents+json, then ensure that
the data is decoded and parsed.

Fixes: cloudevents#284
See: cloudevents#282

Signed-off-by: Lance Ball <lball@redhat.com>
@lance lance added spec/0.3 Support for spec v0.3 module/transport/http Issues related to the HTTP transport protocol implementation type/fix A change that fixes something that is broken module/lib Related to the main source code labels Jul 29, 2020
@lance lance requested a review from a team July 29, 2020 20:06
@lance lance self-assigned this Jul 29, 2020
@lance lance requested review from danbev, grant, helio-frota and lholmquist and removed request for a team July 29, 2020 20:06
Signed-off-by: Lance Ball <lball@redhat.com>
@lance lance merged commit ed9ea95 into cloudevents:master Jul 30, 2020
@lholmquist lholmquist mentioned this pull request Aug 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/lib Related to the main source code module/transport/http Issues related to the HTTP transport protocol implementation spec/0.3 Support for spec v0.3 type/fix A change that fixes something that is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

BinaryHTTPReceiver should remove datacontentencoding property after decoding
3 participants