Incorrect content type seen after FORM authentication restores request

Solution Unverified - Updated -

Issue

  • In some cases, we see Request.getContentType() return an incorrect value (null or another header's value) after FORM authentication completes and restores the original request.
  • We see an exception like the followiing in resteasy after FORM authentication
WARN  [org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher] (ajp-localhost%2F127.0.0.1-8009-10) Failed to parse request.
java.lang.IllegalArgumentException: Failure parsing MediaType string: Keep-Alive
        at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.parse(MediaTypeHeaderDelegate.java:42)
        at org.jboss.resteasy.plugins.delegates.MediaTypeHeaderDelegate.fromString(MediaTypeHeaderDelegate.java:18)
        at javax.ws.rs.core.MediaType.valueOf(MediaType.java:173)
        at org.jboss.resteasy.plugins.server.servlet.ServletUtil.extractHttpHeaders(ServletUtil.java:90)
        at org.jboss.resteasy.plugins.server.servlet.ServletContainerDispatcher.service(ServletContainerDispatcher.java:186)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:55)
        at org.jboss.resteasy.plugins.server.servlet.HttpServletDispatcher.service(HttpServletDispatcher.java:50)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)

Environment

  • JBoss Enterprise Application Platform (EAP)
    • 5.x
    • 6.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase of over 48,000 articles and solutions.

Current Customers and Partners

Log in for full access

Log In
Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.