envoyproxy / envoyproxy/envoy

Allow stateful and stateless header formatters to both be configured

Open
#17,661 3 comments 0 reactions 0 assignees View on GitHub
area/http help wanted
Dominant language
C++
Stars
28.9k
Forks
5.6k
Avg merge
1d 20h
Merged PRs (30d)
437

Description

*Title*: *Allow stateful and stateless header formatters to both be configured*

*Description*:
Currently the header formatter extension point allows the definition of using a stateful header key formatter, or a stateless formatter, but not both at the same time. An example of a stateful formatter is the preserve case formatter, for the stateless there is only the ProperCase formatter currently.

During the review of #15619 it was mentioned that it would be useful to allow stacked formatters, or at least the Proper Case formatter in addition to a stateful formatter. The use case mentioned during that PR was for Envoy generated headers.

Another use case is if the downstream connection is HTTP/2, but upstream clusters are doing HTTP/1.1. In this use case the stateful formatter will not be created and will not be passed to the upstream request. In this case, it could be useful to allow the Stateless formatter.

The requested feature is to allow exactly one stateful formatter, but additionally allow configuration of the Proper Case formatter. It does not cover stacked stateful formatters.

Originally I was thinking this could be limited to the case where there is no stateful formatter to use the stateless formatter attached to the connection. However, now I'm wondering if it would be clearer if the change would be to have a configured stateless formatter only act on unmodified headers in the event that a stateful formatter did not modify the header. Open to suggestions.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.