-
Notifications
You must be signed in to change notification settings - Fork 195
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
Small tweaks to the HTTP wrapper #3099
Conversation
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
A new generated diff is ready to view.
A new doc preview is ready to view. |
@@ -132,7 +132,7 @@ fn apply_endpoint( | |||
for (header_name, header_values) in endpoint.headers() { | |||
request.headers_mut().remove(header_name); | |||
for value in header_values { | |||
request.headers_mut().insert( | |||
request.headers_mut().append( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would be nice to have a unit test for the use of append
if we don't have one.
A new generated diff is ready to view.
A new doc preview is ready to view. |
@@ -404,8 +404,10 @@ impl Headers { | |||
/// Removes all headers with a given key | |||
/// | |||
/// If there are multiple entries for this key, the first entry is returned |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we be more explicit and add something like "all other entries are discarded" or "to get all values for a given key, keep calling this until it returns None"?
A new generated diff is ready to view.
A new doc preview is ready to view. |
Motivation and Context
.insert
was called but it should have beenappend
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.