Some more notes on switching over from Coldfusion to Lucee server. I have a custom reporting application that is running on Fusebox that I couldn’t get the CFFLUSH code I had to keep the status of the report connection updating. It allowed updates as the report generated and kept Internet Explorer connections from timing out. At first I thought it was a problem with Lucee on Apache, but the following code worked in a plain old cfml page without Fusebox.
( The multitude of “Lucee”s are to fill up the buffer to test the CFFLUSH and the sleep() function is to simulate a long running process. There appears to be a minimum you can send back with a flush no matter what the interval is )
Since this works it’s not a Lucee/Apache issue. After reviewing the fusebox4.runtime.cfmx.cfm there is a CFPROCESSINGDIRECTIVE tag for suppressing white space wrapped around the parsed files included by the framework. So the following code in Lucee doesn’t CFFLUSH as expected. It waits for the entire page to run then processes the CFPROCESSINGDIRECTIVE and sends back the data.
The above code also in Adobe Coldfusion. So to fix it I just removed the CFPROCESSINGDIRECTIVE and everything works as I was expecting. Interestingly enough if you turn on supresswhitespace in the Luceee Administrator and remove the CFPROCESSINGDIRECTIVE then the CFFLUSH still works.