<div dir="ltr">Perhaps a coincidence, but it&#39;s pretty much the same error as reported here: <a href="https://issues.jboss.org/browse/UNDERTOW-577">https://issues.jboss.org/browse/UNDERTOW-577</a><div><br></div><div>And the same error that makes it impossible to call sendError in an authentication module (where there&#39;s no such thing as encapsulating within a challenge).</div><div><br></div><div>The fix has solved those 2 issues, but it&#39;s not yet available in a released (or nightly) WildFly build afaik.</div><div><br></div><div><br></div></div><div class="gmail_extra"><br><div class="gmail_quote">On Sat, Nov 21, 2015 at 2:02 AM, Bill Burke <span dir="ltr">&lt;<a href="mailto:bburke@redhat.com" target="_blank">bburke@redhat.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Meh, nevermind...Just gotta encapsulate the call within a challenge.<br>
<div class="HOEnZb"><div class="h5"><br>
On 11/20/2015 7:56 PM, Bill Burke wrote:<br>
&gt; Is there a way to call HttpServletResponse.sendError() within a<br>
&gt; AuthenticationMechanism?  I&#39;m getting the following after calling<br>
&gt; sendError and returning AuthenticationMechanismOutcome.NOT_AUTHENTICATED<br>
&gt;<br>
&gt;<br>
&gt; java.lang.IllegalStateException: UT010019: Response already commited<br>
&gt;       at<br>
&gt; io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:124)<br>
&gt;       at<br>
&gt; io.undertow.servlet.spec.HttpServletResponseImpl.sendError(HttpServletResponseImpl.java:167)<br>
&gt;       at<br>
&gt; io.undertow.servlet.handlers.security.ServletAuthenticationCallHandler.handleRequest(ServletAuthenticationCallHandler.java:61)<br>
&gt;       at<br>
&gt; io.undertow.server.handlers.DisableCacheHandler.handleRequest(DisableCacheHandler.java:33)<br>
&gt;       at<br>
&gt; io.undertow.server.handlers.PredicateHandler.handleRequest(PredicateHandler.java:43)<br>
&gt;       at<br>
&gt; io.undertow.security.handlers.AuthenticationConstraintHandler.handleRequest(AuthenticationConstraintHandler.java:51)<br>
&gt;       at<br>
&gt; io.undertow.security.handlers.AbstractConfidentialityHandler.handleRequest(AbstractConfidentialityHandler.java:45)<br>
&gt;<br>
&gt;<br>
&gt;<br>
<br>
--<br>
Bill Burke<br>
JBoss, a division of Red Hat<br>
<a href="http://bill.burkecentral.com" rel="noreferrer" target="_blank">http://bill.burkecentral.com</a><br>
_______________________________________________<br>
undertow-dev mailing list<br>
<a href="mailto:undertow-dev@lists.jboss.org">undertow-dev@lists.jboss.org</a><br>
<a href="https://lists.jboss.org/mailman/listinfo/undertow-dev" rel="noreferrer" target="_blank">https://lists.jboss.org/mailman/listinfo/undertow-dev</a><br>
</div></div></blockquote></div><br></div>