Search code examples
coldfusioncfhttp

Close Connection and Keep Executing


How can I return a 400 status code and close the connection, without aborting script execution? I'm looking to initiate execution of the script using <cfhttp> but not wait for the script to end before returning.


Solution

  • You need to run the portion of the script you want to keep running after the connection is close, on a different thread.

    Here's a tutorial on how to launch a new thread in Coldfusion.