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

Removed adding multiple uber source request headers #551

Merged
merged 2 commits into from
Jan 22, 2019

Conversation

sandeepboys
Copy link
Contributor

No description provided.

@CLAassistant
Copy link

CLAassistant commented Jan 18, 2019

CLA assistant check
All committers have signed the CLA.

@coveralls
Copy link

Coverage Status

Coverage decreased (-7.6%) to 61.038% when pulling 1d4a187 on UberSourceHeaderFix into 89e0e9d on master.

@sandeepboys sandeepboys merged commit c7b8c7f into master Jan 22, 2019
@@ -143,11 +143,11 @@ func (req *ClientHTTPRequest) WriteJSON(
// Using `Add` over `Set` intentionally, allowing us to create a list
// of headerValues for a given key.
for headerKey, headerValue := range req.defaultHeaders {
httpReq.Header.Add(headerKey, headerValue)
httpReq.Header.Set(headerKey, headerValue)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think this is the right fix, per rfc2616 http header can have multiple values.

Multiple message-header fields with the same field-name MAY be present in a message if and only if the entire field-value for that header field is defined as a comma-separated list [i.e., #(values)]. It MUST be possible to combine the multiple header fields into one "field-name: field-value" pair, without changing the semantics of the message, by appending each subsequent field-value to the first, each separated by a comma. The order in which header fields with the same field-name are received is therefore significant to the interpretation of the combined field value, and thus a proxy MUST NOT change the order of these field values when a message is forwarded.

This pr changes the header semantics to be single valued per header key, which is not correct by spec.

@ChuntaoLu ChuntaoLu deleted the UberSourceHeaderFix branch January 30, 2019 21:32
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.

5 participants