-
Notifications
You must be signed in to change notification settings - Fork 584
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added datacontentencoding #387
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -274,6 +274,29 @@ help intermediate gateways determine how to route the events. | |
[RFC 2046](https://tools.ietf.org/html/rfc2046) | ||
* For Media Type examples see [IANA Media Types](http://www.iana.org/assignments/media-types/media-types.xhtml) | ||
|
||
### datacontentencoding | ||
* Type: `String` per [RFC 2045 Section 6.1](https://tools.ietf.org/html/rfc2045#section-6.1) | ||
* Description: Describes the content encoding for the `data` | ||
attribute for when the `data` field MUST be encoded as a string, | ||
like with structured transport binding modes using the JSON event | ||
format, but the `datacontenttype` indicates a non-string media | ||
type. When the `data` field's effective data type is not `String`, | ||
this attribute MUST NOT be set and MUST be ignored when set. | ||
|
||
The "Base64" value for the Base64 encoding as defined in [RFC 2045 Section 6.8](https://tools.ietf.org/html/rfc2045#section-6.8) | ||
MUST be supported. When set, the event-format-encoded value of the `data` | ||
attribute is a base64 string, but the effective data type of | ||
the `data` attribute towards the application is the base64-decoded | ||
binary array. | ||
|
||
All other RFC2045 schemes are undefined for CloudEvents. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Add a "Constraints" section, like the other attributes? I think at the moment, "Constraints" is "Must be the string 'Base64'". If so, would it make more sense to standardize on assuming 'Base64' encoding and excluding the other options? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @clemensv ^^^ |
||
|
||
* Constraints: | ||
* The attribute MUST be set if the `data` attribute contains string-encoded | ||
binary data. Otherwise the attribute MUST NOT be set. | ||
* If present, MUST adhere to [RFC 2045 Section 6.1](https://tools.ietf.org/html/rfc2045#section-6.1) | ||
|
||
|
||
## Data Attribute | ||
|
||
As defined by the term [Data](#data), CloudEvents MAY include domain-specific | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why not? I want to zip my http binary data payload...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or I want to base64 encode my binary http payload because I am a weirdo...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Perhaps not, looking at RFC 2045 I do not see anything I would want to use besides base64. And normal http transports can give me gzip...
/lgtm