Skip to content
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

Ensure HTTPReceiver is sniffing events according to the specification #136

Closed
lance opened this issue May 7, 2020 · 1 comment · Fixed by #139
Closed

Ensure HTTPReceiver is sniffing events according to the specification #136

lance opened this issue May 7, 2020 · 1 comment · Fixed by #139
Assignees
Labels
module/transport/http Issues related to the HTTP transport protocol implementation type/enhancement New feature or request

Comments

@lance
Copy link
Member

lance commented May 7, 2020

Currently, in the 1.x specification it says that, when the Content-Type header is not prefixed with the Cloud

When the Content-Type header is not prefixed with the CloudEvents media type, being able to know when the message ought to be attempted to be parsed as a CloudEvent can be a challenge. While this specification can not mandate that senders do not include any of the CloudEvents HTTP headers when the message is not a CloudEvent, it would be reasonable for a receiver to assume that if the message has all of the mandatory CloudEvents attributes as HTTP headers then it's probably a CloudEvent. However, as with all CloudEvent messages, if it does not adhere to all of the normative language of this specification then it is not a valid CloudEvent.

That's close to what the implementation is doing, but not quite. At the moment, it's just assuming that an incoming request is a binary event if the content type is not a CloudEvent media type. Instead this should error.

@lance lance added type/enhancement New feature or request module/transport/http Issues related to the HTTP transport protocol implementation labels May 7, 2020
@lance lance self-assigned this May 7, 2020
@lance
Copy link
Member Author

lance commented May 7, 2020

I think we can probably get away with looking for the ce-id header to determine if it's binary.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module/transport/http Issues related to the HTTP transport protocol implementation type/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant