## Expected Behavior binary_headers, binary_body = to_binary(event) For the binary mode, `ce-datacontenttype` HTTP header MUST NOT be present in the message. [spec](https://github.com/cloudevents/spec/blob/v1.0.1/http-protocol-binding.md#311-http-content-type) ## Actual Behavior in the `binary_headers` above, we have both `content-type` and `ce-datacontenttype` ## Steps to Reproduce the Problem ```python import json from cloudevents.http import from_http, to_binary http_request_headers = { "Ce-Id": "dd5d82d7-eb8a-4ff8-8a57-514511192b7f", "Ce-Source": "source", "Ce-Specversion": '1.0', "Ce-Type": "http", "Content-Type": 'application/json;charset=UTF-8' } event = from_http(http_request_headers, json.dumps({})) print(event) binary_headers, binary_body = to_binary(event) print(binary_headers) print(binary_body ) ``` output ``` {'attributes': {'specversion': '1.0', 'id': 'dd5d82d7-eb8a-4ff8-8a57-514511192b7f', 'source': 'source', 'type': 'http', 'datacontenttype': 'application/json;charset=UTF-8', 'time': '2021-05-26T02:22:05.769574+00:00'}, 'data': {}} {'content-type': 'application/json;charset=UTF-8', 'ce-specversion': '1.0', 'ce-id': 'dd5d82d7-eb8a-4ff8-8a57-514511192b7f', 'ce-source': 'source', 'ce-type': 'http', 'ce-datacontenttype': 'application/json;charset=UTF-8', 'ce-time': '2021-05-26T02:22:05.769574+00:00'} b'{}' ``` `binary_headers` has both `ce-datacontenttype` and `content-type` body ## Specifications - Platform: Ubuntu 20.04 - Python Version: 3.8.5 - CloudEvent Sdk: 1.2.0
Activity