-
Notifications
You must be signed in to change notification settings - Fork 10.4k
Parsing extension-av on Set Cookie header #22181
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
Conversation
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.
Seems like a good start. The tests will be the most telling for a change like this. Don't forget to update the reference assemblies.
@@ -554,12 +580,13 @@ public override bool Equals(object obj) | |||
&& StringSegment.Equals(Path, other.Path, StringComparison.OrdinalIgnoreCase) | |||
&& Secure == other.Secure | |||
&& SameSite == other.SameSite | |||
&& HttpOnly == other.HttpOnly; | |||
&& HttpOnly == other.HttpOnly | |||
&& HeaderUtilities.AreEqualCollections(Extensions, other.Extensions); |
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.
Does this consider order of extensions?
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.
Changed that to consider order of extensions
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.
Sorry, I meant the opposite, order shouldn't matter.
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.
Oh, I was thinking what you meant by that and chose the wrong option. I have reverted it back and changed the test for it.
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.
Yeah, I just meant to ask about the behavior of HeaderUtilities.AreEqualCollections.
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.
Just to confirm things. The HeaderUtilities.AreEqualCollections is indeed checking if two unordered list have same content. It does it in O(n*m) time, but since the number of extensions is not likely to reach any high number, so it doesn't really matter.
Because extension-av doesn't have any fixed format we have to look after commas when parsing to determine end of Set-Cookie string
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.
A few style issues to address.
The commas are my biggest behavioral question though.
@ostorc Can you take a look at the feedback? |
@ostorc Are you still working on this? |
Hi, I am sorry for the dealy. I had really busy week. I will finish changes today and update the PR. |
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.
Sorry, one merge conflict to resolve and I think you're done.
Conflict resolved |
Thanks |
This PR adds support for parsing extension-uv and storing data retrieved from it.
Fixes #22077