Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

avoid allocationg ApplicationProtocol in common case#69098

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
wfurt merged 3 commits intodotnet:mainfromwfurt:alpn
May 16, 2022

Conversation

wfurt
Copy link
Member

contributes to#68951
For now, I updated Linux & Windows. Other platforms may be possible.

@wfurtwfurt requested a review froma teamMay 10, 2022 03:20
@wfurtwfurt self-assigned thisMay 10, 2022
@ghost
Copy link

Tagging subscribers to this area: @dotnet/ncl,@vcsjones
See info inarea-owners.md if you want to be subscribed.

Issue Details

contributes to#68951
For now, I updated Linux & Windows. Other platforms may be possible.

Author:wfurt
Assignees:wfurt
Labels:

area-System.Net.Security

Milestone:-

@@ -17,7 +17,20 @@ internal partial struct SslConnectionInfo
alpnContext.ProtoNegoExt == Interop.ApplicationProtocolNegotiationExt.ALPN &&
alpnContext.ProtoNegoStatus == Interop.ApplicationProtocolNegotiationStatus.Success)
{
return alpnContext.Protocol;
if (alpnContext.ProtocolIdSize == s_http1.Length && alpnContext.Protocol.SequenceEqual(s_http1))
Copy link
Member

Choose a reason for hiding this comment

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

Why does the Windows one check ProtocolIdSize but the Linux one doesn't?

rzikm reacted with thumbs up emoji
Copy link
MemberAuthor

Choose a reason for hiding this comment

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

The code originally looked different and I did not want to allocate the Span unless we need to. Perhaps that is cheap. Here I have the size available directly so I left the check in place. On Linux, The Interop function returns always Span so the code is somewhat different. I can remove the extra check if we want to.

Copy link
Member

@rzikmrzikm left a comment

Choose a reason for hiding this comment

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

LGTM, modulo existing comments

@wfurtwfurt merged commitad6f5bc intodotnet:mainMay 16, 2022
@wfurtwfurt deleted the alpn branchMay 16, 2022 20:43
@ghostghost locked asresolvedand limited conversation to collaboratorsJun 16, 2022
@karelzkarelz added this to the7.0.0 milestoneJul 19, 2022
Sign up for freeto subscribe to this conversation on GitHub. Already have an account?Sign in.
Reviewers

@davidfowldavidfowldavidfowl left review comments

@stephentoubstephentoubstephentoub left review comments

@rzikmrzikmrzikm approved these changes

Assignees

@wfurtwfurt

Projects
None yet
Milestone
7.0.0
Development

Successfully merging this pull request may close these issues.

5 participants
@wfurt@davidfowl@stephentoub@rzikm@karelz

[8]ページ先頭

©2009-2025 Movatter.jp