question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Should we consider ce-datacontenttype header when no Content-Type HTTP header is informed?

See original GitHub issue

Hi!

Just a quick question. I see that we are considering the HTTP header Content-typeas the ce-datacontenttype attribute. It’s a good thing, but I came up with certain scenarios where the message comes without the Content-type header, but only with ce-datacontenttype. In such scenarios, we might fail to serialize the message correctly.

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
ricardozaninicommented, Apr 22, 2021

I don’t think it’s related to this SDK. I understand that the Knative Broker is not forwarding the content-type correctly when the message is a cloudevents+json. Although it is correctly parsing the CE. I put this gist together with a reproducer: https://gist.github.com/ricardozanini/9d0652194db6738245fa4fcc566b543e

I think I’ll open an issue for the Knative Eventing folks 😃

0reactions
slinkydevelopercommented, Jun 7, 2021

I think from this side, nothing else can be done, so I’m going to close this issue, reopen if you need it.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Why do we need to set the Content-Type header of an HTTP ...
The "Content-Type" header field indicates the media type of the associated representation: either the representation enclosed in the message ...
Read more >
Content-Type - HTTP - MDN Web Docs - Mozilla
The Content-Type representation header is used to indicate the original media type of the resource (prior to any content encoding applied ...
Read more >
Missing Content-Type Header Detected on Web Application
A Missing Content-Type Header is an attack that is similar to a Code Evaluation (RoR) that -level severity. Categorized as a CWE-16, ISO27001-A.14.1.2, ......
Read more >
What is the Content-Type http header for? - MIT Media Lab
The Content-Type http request header specifies the content type of the http request payload. The Content-Type header is NOT tied to the content...
Read more >
Content-Type HTTP Header: Syntax, Directive, Examples
The Content-Type HTTP Header is used to display the asset's first media type before any substance encoding is used for transmission.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found