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

Fix: duplicate keys in headers when using kafka-http-connector #170

Merged
merged 1 commit into from
Oct 23, 2024

Conversation

soharab-ic
Copy link
Contributor

  • When calling consumer function, we use many default headers like KEDA-Topic, KEDA-Response-Topic, KEDA-Error-Topic, Content-Type, KEDA-Source-Name.
  • We merge theses headers to kafka message and forward the request to consumer function. If kafka message contains header Content-Type then value of this header will be merged with our default value and resultant header will be like this.
Content-Type:[application/json application/json]
  • To avoid this, we use headers.Set method instead of headers.Add which replaces any existing value associated with the key.

Fixes #45

@sanketsudake sanketsudake merged commit 0cff762 into main Oct 23, 2024
10 of 11 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Bug] Duplicated content type in header when use kafka-http-connector
2 participants