Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-2455

onAbort() isn't called if abort is run during onRequestStart()

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 4.0.4.001
    • Fix Version/s: 4.2.0.000, 4.1.0.011
    • Labels:
      None

      Description

      It seems onAbort() isn't able to be called until onRequest() or onCFCRequest() is run. It doesn't seem like that should be necessary. The target script is known before Application.cfc is even executed isn't it? I'd like it to be possible to abort in onRequestStart, onApplicationStart, onServerStart, etc and still have onAbort get called. For now, I still have to use a wrapper UDF for abort because many of my requests abort in onRequestStart(). I could redesign to allow normal event execution perhaps, but things like login page need to override the requested template sometimes.

      Simple Application.cfc example of onAbort() not being called. If you change onRequestStart to onRequest, it does call onAbort.
      <cfcomponent displayname="Application" output="no" hint="Handle the application.">

      <cffunction name="onAbort" access="public" output="yes">
      <cfargument name="template" type="string" required="yes" />
      aborted
      </cffunction>
      <cffunction name="onRequestStart" access="public" output="yes">
      started
      <cfabort>
      </cffunction>
      </cfcomponent>

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                micstriit Michael Offner
                Reporter:
                skyflare Bruce Kirkpatrick
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: