Accept: application/json, application/xml
Accept: text/plain
The Split Header Filter splits header lines with multiple values into multiple header lines each with a single value.
Header values are split using the comma character (,) as a delimiter.
This filter can process both requests and responses.
This filter does not distinguish between headers that should and should not be split.
Any header configured to be split will be split.
Care should to taken to ensure that headers that should not be split (e.g., |
Name: split-header
Default Configuration: split-header.cfg.xml
Released: v8.9.1.0
Bundle: repose-filter-bundle
This configuration will split the Accept
and X-Roles
headers on the request, and the Cache-Control
header on the response.
For example, if a request is made with the header lines:
Accept: application/json, application/xml
Accept: text/plain
This filter will split those header lines into the header lines:
Accept: application/json
Accept: application/xml
Accept: text/plain
<split-header xmlns='http://docs.openrepose.org/repose/split-header/v1.0'>
<request> (1)
<header>accept</header> (2)
<header>x-roles</header> (3)
</request>
<response> (4)
<header>cache-control</header> (5)
</response>
</split-header>
1 | A container for all of the request headers that should be split by this filter. |
2 | A header to be split by this filter.
In this case, the standard HTTP Accept header will be split on requests. |
3 | A header to be split by this filter.
In this case, the Repose-specific X-Roles header will be split on requests. |
4 | A container for all of the response headers that should be split by this filter. |
5 | A header to be split by this filter.
In this case, the standard HTTP Cache-Control header will be split on responses. |
This filter may be used to imitate the the behavior of Repose when header splitting was performed as a core function rather than by this filter (prior to Repose v9). To configure this filter for that use case, see the Repose < 9.0 Header Splitting Behavior recipe.