-
Notifications
You must be signed in to change notification settings - Fork 219
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix segfault if ce-specversion header missing (#165)
If a HTTP request does not contain the `ce-specversion` header then the process of converting the request to an event returns a `nil` event and a non-fatal error value. Unfortunately, in this situation, the code continued to process the request resulting in an attempt to de-reference the `nil` event value. Fix by adding an additional condition to the error handling. Now conversions that yield a non-fatal error must also return a non-nil event, otherwise a HTTP 400 (Bad Request) status is returned. Signed-off-by: Adrian Preston <prestona@uk.ibm.com>
- Loading branch information
Showing
2 changed files
with
45 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters