Skip to content

Conversation

lance
Copy link
Member

@lance lance commented Mar 24, 2021

The HTTP.isEvent() and HTTP.toEvent() functions both had some validation
code that violated the principle of loose validation when receiving an
event over HTTP. As discussed, the validation should be managed by the
receiver in this case with event.validate()

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

The `HTTP.isEvent()` and `HTTP.toEvent()` functions both had some validation
code that violated the principle of loose validation when receiving an
event over HTTP. As discussed, the validation should be managed by the
receiver in this case with `event.validate()`

Signed-off-by: Lance Ball <lball@redhat.com>
@lance lance added the type/fix A change that fixes something that is broken label Mar 24, 2021
@lance lance requested a review from a team March 24, 2021 20:01
@lance lance self-assigned this Mar 24, 2021
@lance
Copy link
Member Author

lance commented Mar 24, 2021

@lholmquist I was hoping to get this in before 4.0.1 but 🤷. Once this is out, I can replace all of this with HTTP.isEvent(). https://github.com/boson-project/faas-js-runtime/blob/e06ee4297e6a806ca1df0ac2b075bae7cdd289f0/lib/event-handler.js#L34-L50

@lance lance merged commit efe466a into cloudevents:main Mar 25, 2021
@lance lance deleted the lance/is-event-fix branch March 25, 2021 16:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type/fix A change that fixes something that is broken
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants