Skip to content

Conversation

@glbrntt
Copy link
Collaborator

@glbrntt glbrntt commented Oct 30, 2019

Motivation:

Regex is overkill to check which HTTP version is being used in the
HTTPProtocolSwitcher.

Modifications:

Determine the HTTP version by checking for a substring instead of using
a regex.

Result:

Simpler code.

Motivation:

Regex is overkill to check which HTTP version is being used in the
HTTPProtocolSwitcher.

Modifications:

Determine the HTTP version by checking for a substring instead of using
a regex.

Result:

Fewer allocations!
@glbrntt glbrntt requested a review from MrMage October 30, 2019 13:18
@glbrntt
Copy link
Collaborator Author

glbrntt commented Oct 30, 2019

Credit to @Lukasa for pointing this out

@glbrntt glbrntt merged commit 2cd9ea7 into grpc:nio Nov 5, 2019
@glbrntt glbrntt deleted the gb-protocol-switcher branch November 5, 2019 13:28
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