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

[Bug] Duplicated content type in header when use kafka-http-connector #45

Open
chenjr0719 opened this issue Dec 27, 2020 · 1 comment
Open
Assignees
Labels
bug Something isn't working connector-kafka

Comments

@chenjr0719
Copy link
Contributor

Hi there, I found an issue in kafka-http-connector.

headers := http.Header{
"KEDA-Topic": {conn.connectorData.Topic},
"KEDA-Response-Topic": {conn.connectorData.ResponseTopic},
"KEDA-Error-Topic": {conn.connectorData.ErrorTopic},
"Content-Type": {conn.connectorData.ContentType},
"KEDA-Source-Name": {conn.connectorData.SourceName},
}
// Set the headers came from Kafka record
for _, h := range message.Headers {
headers.Add(string(h.Key), string(h.Value))
}

If the message header also specifies the same keys (ex: content-type), when it sends the request to the function might be broken because of the duplicate key.

I would like to know, is it possible to check the message header first, and if it doesn't contain the same key, we use the default value here?

@blackfly19
Copy link
Contributor

Hi @chenjr0719. Can you please provide the steps to reproduce the issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working connector-kafka
Projects
None yet
Development

No branches or pull requests

4 participants