Skip to content

Fix for issue #7607 (efficient mapping between enum values and strings)#7624

Closed
ywkaras wants to merge 1 commit intoapache:masterfrom
ywkaras:SNIPolicyParse
Closed

Fix for issue #7607 (efficient mapping between enum values and strings)#7624
ywkaras wants to merge 1 commit intoapache:masterfrom
ywkaras:SNIPolicyParse

Conversation

@ywkaras
Copy link
Contributor

@ywkaras ywkaras commented Mar 25, 2021

#7607

Provides utilities for handling values that can be represented as either a string or a number in
a 0-base range.

@ywkaras ywkaras self-assigned this Mar 25, 2021
@ywkaras ywkaras added this to the 10.0.0 milestone Mar 25, 2021
@ywkaras ywkaras linked an issue Mar 25, 2021 that may be closed by this pull request
@ywkaras
Copy link
Contributor Author

ywkaras commented Mar 25, 2021

The CodeOrStr template may also be useful to efficiently handle sets of MIME headers.

@maskit
Copy link
Member

maskit commented Mar 26, 2021

Seems like overkill. To be honest, I don't want to maintain the utilities.

@ywkaras
Copy link
Contributor Author

ywkaras commented Mar 26, 2021

What do you propose as an alternative approach to resolve this issue?

@ywkaras ywkaras force-pushed the SNIPolicyParse branch 3 times, most recently from f063a34 to e3088a8 Compare March 26, 2021 19:54
@SolidWallOfCode
Copy link
Member

SolidWallOfCode commented Mar 26, 2021

I recommended bringing in Lexicon - http://docs.solidwallofcode.com/libswoc/code/Lexicon.en.html
I wrote it for exactly this kind of thing for use in ATS.

@ywkaras
Copy link
Contributor Author

ywkaras commented Mar 26, 2021

I knew it was too good to be true that I'd get to overload the comma operator.

@ywkaras ywkaras force-pushed the SNIPolicyParse branch 3 times, most recently from 78aaf46 to de3c4fb Compare March 27, 2021 02:45
@maskit
Copy link
Member

maskit commented Mar 27, 2021

i"d just move the current strcmp logic into the callback function.

@ywkaras ywkaras closed this Mar 29, 2021
@ywkaras ywkaras reopened this Mar 29, 2021
@ywkaras ywkaras force-pushed the SNIPolicyParse branch 5 times, most recently from 1009d00 to a2be560 Compare March 29, 2021 21:40
@ywkaras ywkaras changed the title Fix for issue #7607 Fix for issue #7607 (efficient mapping between enum values and strings) Mar 29, 2021
@ywkaras ywkaras force-pushed the SNIPolicyParse branch 2 times, most recently from da47e42 to d622c69 Compare March 29, 2021 22:07
apache#7607

Provides utilities for handling values that can be represented as either a string or a number in
a 0-base range.
@ywkaras ywkaras reopened this Mar 29, 2021
@ywkaras ywkaras closed this Mar 30, 2021
@ywkaras ywkaras reopened this Mar 30, 2021
@ywkaras ywkaras closed this Mar 30, 2021
@ywkaras ywkaras reopened this Mar 30, 2021
@ywkaras ywkaras removed this from the 10.0.0 milestone Mar 30, 2021
@ywkaras ywkaras closed this Mar 30, 2021
@ywkaras
Copy link
Contributor Author

ywkaras commented Mar 30, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Inefficiency in SNI policy parsing

3 participants