There is not really any way to do this at the moment. The order should not matter for HTTP headers, so we don't provide any way to access this.

If you want to do this I think you will have to maintain a custom fork.

Stuart

On Fri, Aug 24, 2018 at 6:49 PM Ilpo Ruotsalainen <ilpo.ruotsalainen@oath.com> wrote:
Hi,

A project we're working on has recently ran into a need to access the HTTP request headers in order they were received. This does not seem currently possible as HeaderMap is just a hash table.

One way I see to get this functionality would be to make HeaderMap non-final and provide a mechanism for configuring the class used for request headers, but I don't particularly like this as the HeaderMap API is fairly wide and some of the methods are semantically tricky for this particular purpose.

Obviously we'd prefer a solution where the modifications to Undertow itself are acceptable for upstreaming so we don't have to maintain a custom fork of it. Any suggestions would be appreciated.
_______________________________________________
undertow-dev mailing list
undertow-dev@lists.jboss.org
https://lists.jboss.org/mailman/listinfo/undertow-dev