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

Pevent merging of repeated values in headerMap when using custom handlers #2099

Merged
merged 1 commit into from
Aug 28, 2017
Merged

Conversation

r3dqu33n
Copy link
Contributor

The NameValueCollection auto merges (according to MSDN) all the values under the same key, with ",".
This breaks some headers, like the "Set-Cookie"; where the "." has another meanings according to RFC.

as far as i've seen, this issue will be present everytime a customhandler is used.

@@ -237,4 +237,4 @@ namespace CefSharp
}
};
}
}
Copy link
Member

Choose a reason for hiding this comment

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

Revert this please

@@ -1,4 +1,4 @@
// Copyright 2010-2017 The CefSharp Authors. All rights reserved.
// Copyright © 2010-2017 The CefSharp Authors. All rights reserved.
Copy link
Member

Choose a reason for hiding this comment

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

Revert this please

String^ value = headers[key];
result.insert(std::pair<CefString, CefString>(StringUtils::ToNative(key), StringUtils::ToNative(value)));
for each(String^ value in headers->GetValues(key))
result.insert(std::pair<CefString, CefString>(StringUtils::ToNative(key), StringUtils::ToNative(value)));
Copy link
Member

Choose a reason for hiding this comment

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

Braces around the body of the loop please

@merceyz
Copy link
Member

merceyz commented Aug 28, 2017

Made some comments inline

…s under the same key, with ",".

This breaks some headers, like the "Set-Cookie"; where the "." has another meanings according to RFC.
@r3dqu33n
Copy link
Contributor Author

requested changes done.

@r3dqu33n r3dqu33n reopened this Aug 28, 2017
@r3dqu33n
Copy link
Contributor Author

thanks @merceyz for your feedback. i've made the changes you reviewed.

@merceyz merceyz merged commit b82ce07 into cefsharp:master Aug 28, 2017
@merceyz
Copy link
Member

merceyz commented Aug 28, 2017

Thank you

@merceyz merceyz added this to the 59.0.0 milestone Aug 28, 2017
@amaitland amaitland modified the milestones: 59.0.0, 62.0.0 Dec 13, 2017
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.

3 participants