1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.
  2. Anuncie Aqui
    Anuncie aqui você Também: fdantas@4each.com.br

[JBoss] WildFly Undertow UT000173: Invalid control character [250] in cookie - persists

Discussão em 'StackOverflow' iniciado por Stack, Novembro 21, 2025.

  1. Stack

    Stack Membro Participativo

    I'm experiencing a persistent cookie corruption issue with my Java EE web application deployed on WildFly 37.0.1.Final. The error appears immediately when accessing the application URL, even after clearing all browser cookies, server cache, and testing in incognito mode.

    I'm a development student and this issue is honestly driving me a bit crazy, since I can’t figure out why it keeps happening despite trying all the usual fixes. Any guidance would be really appreciated. Thanks in advance!

    Error Details


    Full Error Message:

    java.lang.IllegalArgumentException: UT000173: An invalid control character [250] was present in the cookie value or attribute
    at io.undertow.core@2.3.18.Final//io.undertow.util.LegacyCookieSupport.isHttpSeparator(LegacyCookieSupport.java:149)
    at io.undertow.core@2.3.18.Final//io.undertow.util.LegacyCookieSupport.isHttpToken(LegacyCookieSupport.java:170)
    at io.undertow.core@2.3.18.Final//io.undertow.util.LegacyCookieSupport.adjustedCookieVersion(LegacyCookieSupport.java:255)
    at io.undertow.core@2.3.18.Final//io.undertow.server.Connectors.getCookieString(Connectors.java:195)
    at io.undertow.core@2.3.18.Final//io.undertow.server.Connectors.flattenCookies(Connectors.java:121)


    When it occurs: Immediately upon accessing http://localhost:8080/Pedidos/ before any user interaction.

    Relevant @SessionScoped bean


    @Data
    @SessionScoped
    @Named
    public class Cesta implements Serializable {
    private static final long serialVersionUID = 1L;
    private List productos = new ArrayList<>();
    private User usuario;
    }

    Request forwarding code


    @WebServlet("/")
    public class PedidosController extends HttpServlet {
    protected void doGet(HttpServletRequest request, HttpServletResponse response)
    throws ServletException, IOException {
    request.getRequestDispatcher("/login.jsp").forward(request, response);
    }
    }

    persistence.xml


    <persistence>
    <persistence-unit name="Pubs">
    <jta-data-source>java:/Pubs</jta-data-source>
    </persistence-unit>
    </persistence>

    standalone.xml datasource


    <connection-url>jdbc:sqlserver://localhost:1433;databaseName=Pubs;encrypt=false</connection-url>
    <driver>sqlserver</driver>


    That's all — thanks!

    Continue reading...

Compartilhe esta Página