-
Notifications
You must be signed in to change notification settings - Fork 406
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Inconsistent content type check for cloudevent response #966
Comments
there's code to use https://golang.org/src/mime/mediatype.go?s=2954:3039#L102 laying around fn, we just need to more consistently use it. |
rdallman
pushed a commit
that referenced
this issue
May 2, 2018
related: fnproject/fdk-go#26 adds a test for the protocol dumping of a request to the container stdin. there are a number of vectors to test for a cloud event, but since we're going to change that behavior soon it's probably a waste of time to go about doing so. in any event, this was pretty broken. my understanding of the cloud event spec is deepening and the json stuff overall seems like a pretty poor choice so far. * fixes content type issue around json checking (since a string is also a json value, we can just decode it, even though it's wasteful it's more easily correct) * doesn't force all json values to be map[string]interface{} and lets them be whoever they want to be. maybe their dads are still proud. closes #966
rdallman
pushed a commit
that referenced
this issue
May 7, 2018
related: fnproject/fdk-go#26 adds a test for the protocol dumping of a request to the container stdin. there are a number of vectors to test for a cloud event, but since we're going to change that behavior soon it's probably a waste of time to go about doing so. in any event, this was pretty broken. my understanding of the cloud event spec is deepening and the json stuff overall seems like a pretty poor choice so far. * fixes content type issue around json checking (since a string is also a json value, we can just decode it, even though it's wasteful it's more easily correct) * doesn't force all json values to be map[string]interface{} and lets them be whoever they want to be. maybe their dads are still proud. closes #966
rdallman
added a commit
that referenced
this issue
May 7, 2018
adds a test for the protocol dumping of a request to the containert stdin. there are a number of vectors to test for a cloud event, but since we're going to change that behavior soon it's probably a waste of time to go about doing so. in any event, this was pretty broken. my understanding of the cloud event spec is deepening and the json stuff overall seems a little weird. * fixes content type issue around json checking (since a string is also a json value, we can just decode it, even though it's wasteful it's more easily correct) * doesn't force all json values to be map[string]interface{} and lets them be whoever they want to be. maybe their dads are still proud. closes #966
rdallman
added a commit
that referenced
this issue
May 8, 2018
adds a test for the protocol dumping of a request to the containert stdin. there are a number of vectors to test for a cloud event, but since we're going to change that behavior soon it's probably a waste of time to go about doing so. in any event, this was pretty broken. my understanding of the cloud event spec is deepening and the json stuff overall seems a little weird. * fixes content type issue around json checking (since a string is also a json value, we can just decode it, even though it's wasteful it's more easily correct) * doesn't force all json values to be map[string]interface{} and lets them be whoever they want to be. maybe their dads are still proud. closes #966
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem happens here https://github.com/fnproject/fn/blob/master/api/agent/protocol/cloudevent.go#L194
Error:
Trace:
The text was updated successfully, but these errors were encountered: