Groups keyboard shortcuts have been updated
Dismiss
See shortcuts

exchange request attributes must be string

21 views
Skip to first unread message

Brad Wood

unread,
May 12, 2023, 5:55:41 PM5/12/23
to Undertow Dev
Is there a compelling reason why the REQUEST_ATTRIBUTES attachment in the exchange requires the values in the Map to be strings?  

AttachmentKey<Map<String, String>>

I realize 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.

Brad Wood

unread,
May 24, 2023, 5:46:26 PM5/24/23
to Undertow Dev
Any feedback here?

Flavia Rainone

unread,
Jun 6, 2023, 1:36:40 AM6/6/23
to Undertow Dev
Hi Brad

I did some research and I couldn't find a reason for that, despite that internally the request attributes are always used as Strings.

I think we can add this to Undertow.

Best,
Flavia

Brad Wood

unread,
Jun 6, 2023, 6:32:53 PM6/6/23
to Flavia Rainone, Undertow Dev
Thanks for the followup.  I've entered tis ticket:


~Brad

Developer Advocate
Ortus Solutions, Corp 

ColdBox Platform: http://www.coldbox.org 



--
You received this message because you are subscribed to a topic in the Google Groups "Undertow Dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/undertow-dev/TafMF-JS0Yo/unsubscribe.
To unsubscribe from this group and all its topics, send an email to undertow-dev...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/undertow-dev/799094c8-b5f3-49d9-a37f-c60fcb6bc843n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages