You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the Bug Spec states that the ce-datacontenttype header MUST NOT be present in a binary mode message. If it is passed anyway, no error is thrown and the given ce-datacontenttype is treated as extension attribute overwriting the value from the Content-Type header.
I don't think it should, to be honest. This is similar to other scenarios that have been pointed out with regard to receiving malformed events. The HTTP.toEvent() function is meant to be used when receiving events via incoming HTTP requests, and we should be as forgiving as possible. To me the debate is really, what should the datacontenttype value be in this scenario, text/xml or application/json?
Thanks for pointing out those two bugs. You're right that they are incorrect.
Describe the Bug
Spec states that the
ce-datacontenttype
header MUST NOT be present in a binary mode message. If it is passed anyway, no error is thrown and the givence-datacontenttype
is treated as extension attribute overwriting the value from theContent-Type
header.Steps to Reproduce
Use the following snippet:
Check the resulting event:
Expected Behavior
HTTP.toEvent
should throw to prevent this.Additional context
Not quite sure why the
datacontenttype
(also withoutce-
prefix) is part of the binary parsers so maybe it is intentional though?sdk-javascript/src/message/http/headers.ts
Line 98 in 6be3b27
And I assume this is also a bug (where it should use
v03binaryParsers
on the else path instead):sdk-javascript/src/message/http/index.ts
Line 141 in 6be3b27
The text was updated successfully, but these errors were encountered: