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 for lost HttpHeader items #161

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

dwhathaway
Copy link

In cases where there are multiple header entries with the same name,
only the first one in the collection was being copied from the OkHttp
Header to the HttpResponseMessage.Headers collection

In cases where there are multiple header entries with the same name,
only the first one in the collection was being copied from the OkHttp
Header to the HttpResponseMessage.Headers collection
@@ -152,8 +152,10 @@ string getHeaderSeparator(string name)

var respHeaders = resp.Headers();
foreach (var k in respHeaders.Names()) {
ret.Headers.TryAddWithoutValidation(k, respHeaders.Get(k));
ret.Content.Headers.TryAddWithoutValidation(k, respHeaders.Get(k));
foreach (string item in respHeaders.Values(k)) {
Copy link
Owner

Choose a reason for hiding this comment

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

Fix the tabs

fabionuno added a commit to fabionuno/ModernHttpClient that referenced this pull request Nov 20, 2015
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.

2 participants