5 Replies Latest reply on Mar 27, 2008 8:56 AM by -==cfSearching==-

    Writing out Binary Data via CFScript

      Hopefully someone will be able to provide some insight or possible resolution to this:

      On a site I'm now managing there is a piece of code that is being used to write out binary data (images) to the client that are located on the HDD. This code (after doing some searching) is verbatim from Christian Cantrell's blog posting from about 5 years ago ( Using ColdFusion to Write out Binary Data).

      As far as I can tell the end user is not experiencing any problems - but the exception.log (as well as the application.log) is filling up with the following error:

      at jrun.servlet.JRunResponse.getOutputStream(JRunResponse.java:179)

      (Hopefully the actual code in question is posted at the bottom of this message)

      Of course if the end users are not getting an error this is fine, but it doesn't reflect well on us when the client decides to look at the log files and sees and endless stream of error messages related to this code.

      I have tried using the reponse.reset(); in a couple of different locations within that 'script' but this in turn generates teh following error:

      java.lang.IllegalStateException: Response has already been committed
      at jrun.servlet.jrpp.ProxyEndpoint.resetBuffer(ProxyEndpoint.java:991)

      I've searched and read every possible link I could google and nothing else seems to provide any insight on a solution.

      The client is currently running CFMX 7.0.2 (no hot fixes) standard edition ... which seems to be utilizing JRun Updater 5.

      Thanks in advance for any possible insight or fix.