Skip to content
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

Change Content-Type to those Content-Type that cloud sdk-go supports #2009

Closed
capri-xiyue opened this issue Oct 8, 2019 · 1 comment · Fixed by #2010
Closed

Change Content-Type to those Content-Type that cloud sdk-go supports #2009

capri-xiyue opened this issue Oct 8, 2019 · 1 comment · Fixed by #2010
Assignees
Labels
kind/bug Categorizes issue or PR as related to a bug.

Comments

@capri-xiyue
Copy link
Contributor

capri-xiyue commented Oct 8, 2019

Describe the bug
Got Response as follows when I did performance test for broker with pubsub channel:
400 Bad Request 400 HTTP/1.1 1 1 map[Content-Length:[197] Content-Type:[text/plain; charset=utf-8] Date:[Fri, 04 Oct 2019 03:01:38 GMT]] 0xc000371400 197 [] false false map[] 0xc0004a1600 <nil>}
Currently cloudevents sdk-go only supports type as follows:
"application/json" and "text/json" and "application/xml" and "text/xml"
It doesn't support "text/plain". I've created cloudevents/sdk-go#232 to fix this issue. Before cloudevents/sdk-go#232 gets solved, need to change Content-Type to those Content-Type that cloud sdk-go supports to unblock the performance tests.
In addition, when I did the performance tests, I noticed two weird things:

  1. The same perf test code for broker with inmemory channel works even though the content-type is still text-plain.
  2. After I change Content-Type to application/json, the performance test for broker with pubsub channel works. But when I change it to Content-Type to text/json, it doesn't work. Both application/json and text/json are supported by cloudevents sdk-go

Expected behavior
Change Content-Type to application/json.
Performance tests for broker with either inmemory channel or pubsub channel can run successfully.
To Reproduce
Steps to reproduce the behavior.
Run performance tests for broker with pubsub channel. The perf tests are written in knative-gcp.
Knative release version

Additional context
Add any other context about the problem here such as proposed priority

@capri-xiyue capri-xiyue added the kind/bug Categorizes issue or PR as related to a bug. label Oct 8, 2019
@capri-xiyue
Copy link
Contributor Author

/assign @capri-xiyue

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Categorizes issue or PR as related to a bug.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant