Skip to content

Should clean up TSHttpTxnConfigFind #4211

@shinrich

Description

@shinrich

While setting up a PR that removes a overridable config, I ran across TSHttpTxnConfigFind which implements a mapping from configuration string name to enum and type. Rather than implementing this as a map initialized from the existing list of overridable types, it is a nested case statement. Which seems very fragile. The comment at the top of the function says it is suboptimal and should not be used on the fast path. So at that point, we might as well make it maintainable and hard to break.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions