Uploaded image for project: 'Undertow'
  1. Undertow
  2. UNDERTOW-2278

Allow exchange attributes to be Object

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Unresolved
    • Major
    • 2.4.0.Final
    • None
    • None
    • None

    Description

      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.

      Attachments

        Activity

          People

            flaviarnn Flavia Rainone
            bdw429s Brad Wood
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: