-
Enhancement
-
Resolution: Unresolved
-
Major
-
None
-
None
-
None
Related thread on mailing list:
https://groups.google.com/g/undertow-dev/c/TafMF-JS0Yo/m/tWIdZ1koBQAJ
The REQUEST_ATTRIBUTES attachment in the exchange requires the values in the Map to be string.
AttachmentKey<Map<String, String>>
The only place Undertow really uses them is to pass along attribute from the AJP listener. However, I've found several use cases over the years where I want to set up attributes IO handler chain (prior to the servlet) for my servlet to use later. Servlet request attributes are allowed to have any value:
Map<String, Object> attributes
This design in Undertow makes it impossible for me to set up request attributes which are not strings in the exchange prior to the servlet. Examples I've run into are SSL certs (javax.servlet.request.X509Certificate) and error exceptions (javax.servlet.error.exception, and javax.servlet.error.exception_type) which can't be set into the REQUEST_ATTRIBUTES attachment.
This ticket is to refactor the exchange attributes to be a Map of String,Object instead of String,String so it matches the servlet request attributes.