Taffy throwing Coldfusion error - ColdFusion was unable to add the header you specified to the output stream. This is probably because you have already used a cfflush tag in your template or buffered output is turned off.

559 views
Skip to first unread message

jcor...@etsos.co.uk

unread,
Aug 11, 2015, 5:33:13 AM8/11/15
to Taffy Users
Haven't had any problems with this code since I deployed it but now it's started throwing this error, anyone any ideas?


Stack Trace:

coldfusion.runtime.EventHandlerException: Event handler exception. at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:309) at coldfusion.filter.ApplicationFilter.invoke(ApplicationFilter.java:462) at coldfusion.filter.RequestMonitorFilter.invoke(RequestMonitorFilter.java:42) at coldfusion.filter.MonitoringFilter.invoke(MonitoringFilter.java:40) at coldfusion.filter.PathFilter.invoke(PathFilter.java:142) at coldfusion.filter.ExceptionFilter.invoke(ExceptionFilter.java:94) at coldfusion.filter.BrowserDebugFilter.invoke(BrowserDebugFilter.java:78) at coldfusion.filter.ClientScopePersistenceFilter.invoke(ClientScopePersistenceFilter.java:28) at coldfusion.filter.BrowserFilter.invoke(BrowserFilter.java:38) at coldfusion.filter.NoCacheFilter.invoke(NoCacheFilter.java:58) at coldfusion.filter.GlobalsFilter.invoke(GlobalsFilter.java:38) at coldfusion.filter.DatasourceFilter.invoke(DatasourceFilter.java:22) at coldfusion.filter.CachingFilter.invoke(CachingFilter.java:62) at coldfusion.filter.RequestThrottleFilter.invoke(RequestThrottleFilter.java:151) at coldfusion.CfmServlet.service(CfmServlet.java:219) at coldfusion.bootstrap.BootstrapServlet.service(BootstrapServlet.java:89) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:303) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at coldfusion.monitor.event.MonitoringServletFilter.doFilter(MonitoringServletFilter.java:42) at coldfusion.bootstrap.BootstrapFilter.doFilter(BootstrapFilter.java:46) at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:241) at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:208) at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:220) at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:122) at org.apache.catalina.authenticator.AuthenticatorBase.invoke(AuthenticatorBase.java:501) at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:171) at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:102) at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:116) at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:422) at org.apache.coyote.ajp.AjpProcessor.process(AjpProcessor.java:199) at org.apache.coyote.AbstractProtocol$AbstractConnectionHandler.process(AbstractProtocol.java:607) at org.apache.tomcat.util.net.JIoEndpoint$SocketProcessor.run(JIoEndpoint.java:314) at java.util.concurrent.ThreadPoolExecutor.runWorker(Unknown Source) at java.util.concurrent.ThreadPoolExecutor$Worker.run(Unknown Source) at org.apache.tomcat.util.threads.TaskThread$WrappingRunnable.run(TaskThread.java:61) at java.lang.Thread.run(Unknown Source) Caused by: coldfusion.tagext.net.HeaderTag$InvalidHeaderException: Failed to add HTML header. at coldfusion.tagext.net.HeaderTag.doStartTag(HeaderTag.java:138) at coldfusion.runtime.CfJspPage._emptyTcfTag(CfJspPage.java:2991) at cfbaseDeserializer2ecfc2023897357$funcTHROWERROR.runFunction(E:\taffy\core\baseDeserializer.cfc:35) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2845) at cfbaseDeserializer2ecfc2023897357$funcGETFROMFORM.runFunction(E:\taffy\core\baseDeserializer.cfc:13) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:533) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:648) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:457) at coldfusion.runtime.CfJspPage._invoke(CfJspPage.java:2424) at coldfusion.tagext.lang.InvokeTag.doEndTag(InvokeTag.java:399) at cfapi2ecfc452156503$funcGETDESERIALIZED.runFunction(E:\taffy\core\api.cfc:825) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2845) at cfapi2ecfc452156503$funcPARSEREQUEST.runFunction(E:\taffy\core\api.cfc:627) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.filter.SilentFilter.invoke(SilentFilter.java:47) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.CfJspPage._invokeUDF(CfJspPage.java:2845) at cfapi2ecfc452156503$funcONREQUEST.runFunction(E:\taffy\core\api.cfc:209) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:487) at coldfusion.runtime.UDFMethod$ReturnTypeFilter.invoke(UDFMethod.java:420) at coldfusion.runtime.UDFMethod$ArgumentCollectionFilter.invoke(UDFMethod.java:383) at coldfusion.filter.FunctionAccessFilter.invoke(FunctionAccessFilter.java:95) at coldfusion.runtime.UDFMethod.runFilterChain(UDFMethod.java:334) at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:231) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:643) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:432) at coldfusion.runtime.TemplateProxy.invoke(TemplateProxy.java:402) at coldfusion.runtime.AppEventInvoker.invoke(AppEventInvoker.java:108) at coldfusion.runtime.AppEventInvoker.onRequest(AppEventInvoker.java:301) ... 35 more

Adam Tuttle

unread,
Aug 11, 2015, 9:40:35 AM8/11/15
to taffy...@googlegroups.com
Hey there,

It looks like possibly a bad request. If we search the raw stack trace for ".cfc" we'll find a few helpful references, more akin to the usual CF "tag context"~
  • taffy.core.baseDeserializer.cfc:35
  • taffy.core.baseDeserializer.cfc:13
  • taffy.core.api.cfc:825
  • taffy.core.api.cfc:627
  • taffy.core.api.cfc:209
Looking at the first line shows that we're in the baseDeserializer (part of the mechanics of parsing the incoming request) inside a function called throwError, so we're definitely intentionally throwing an error. Let's see if we can figure out why. Since the error is during the request-parsing phase, we know that your resource code hasn't been executed yet -- Taffy (or your serializer) is just unable to parse the incoming request for some reason.

The next line reference is from further up in baseDeserializer, inside the getFromForm function. So we're attempting to process something encoded as if it were a form submission (not necessarily from a form, just using the same formatting). The line in question, 13, is:

<cfset throwError(400, "You've indicated that you're sending form-encoded data but it doesn't appear to be valid. Aborting request.") />

So taffy thinks that the request should be handled like a form (the content-type header specifies this: application/x-www-form-urlencoded), but the body data does not match the expected formatting. When using this content type, the expected body value follows the pattern:

foo=bar&fizz=buzz&taffy=awesome

It's basically a URL query-string formatting, minus the leading question mark. Taffy is checking for the existence of at least one = and not finding it, thus it's throwing this error.

Hopefully that helps you resolve the issue. Without more details about the request (headers, body, verb, etc) I'm afraid I can't pinpoint anything more specific.

If you think this is a bug (e.g. your request doesn't use the application/x-www-form-urlencoded content-type, or the body does contain an =, please file a bug!)

-Adam

--
You received this message because you are subscribed to the Google Groups "Taffy Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to taffy-users...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Adam Tuttle

unread,
Aug 11, 2015, 9:45:02 AM8/11/15
to taffy...@googlegroups.com
Taking another look at this, while what I previously wrote seems to be true, there appears to be another issue in play.

Caused by: coldfusion.tagext.net.HeaderTag$InvalidHeaderException: Failed to add HTML header.

So this is telling us that the <cfheader> line in the implementation of throwError() is somehow invalid. I'm guessing you're not on a vanilla Adobe ColdFusion 9/10/11 install... Are you running on a different app server? Vanilla tomcat? Did you recently upgrade your JRE/JDK?

jcor...@etsos.co.uk

unread,
Aug 11, 2015, 9:56:22 AM8/11/15
to Taffy Users
I don't think we are on anything special - it's a CF11 server

Server Product     ColdFusion
Version     11,0,05,293506
Tomcat Version     7.0.54.0
Edition     Standard 
Operating System     Windows Server 2012 
OS Version     6.2 
Update Level     C:/ColdFusion11/cfusion/lib/updates/chf11000005.jar 
Adobe Driver Version     5.1.3 (Build 000094) 
Java Version     1.8.0_45  

Adam Tuttle

unread,
Aug 12, 2015, 12:05:05 PM8/12/15
to Taffy Users
What about the request body, what does that look like?

--
Reply all
Reply to author
Forward
0 new messages