I'm doing a redirect in the onRequestStart method of the Application.cfc to a secure URL. Basically, I want to redirect the user to the ssl domain when they enter the shopping cart and off the ssl domain when they are on the rest of the site. I'm currently doing this:
<!--- SSL Redirection to secure shopping cart --->
<cfif application.config.ENABLE_SSLREDIRECT AND IsDefined("URL.page")>
<cfif URL.page IS "ViewCart" AND CGI.HTTPS IS "off">
<cflocation url="<cfelseif URL.page IS NOT "ViewCart" AND CGI.HTTPS IS "on">
<cflocation url="</cfif>
</cfif>
If the page is ViewCart and the CGI.HTTPS var is off redirect to the same page but at the https domain.
From the client side it works seamlessly. But behind the scenes it's throwing the following error:
struct
Detail An exception occurred when invoking a event handler method from Application.cfc The method name is: onRequestStart.
Message Event Handler Exception.
RootCause struct
Message [empty string]
StackTrace coldfusion.runtime.AbortException at coldfusion.tagext.net.LocationTag.doEndTag(LocationTag.java:161) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1916) at cfApplication2ecfc113272939$funcONREQUESTSTART.runFunction(C:\Inetpub\ at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:348) at coldfusion.runtime.UDFMethod
It works. I only see the error in the email that gets sent in the onError method of the Application.cfc. It seems to throw the error and redirect anyway. Is this a potential bug or is what I am trying to do to blame?
Thanks for any help...
Anthony
<!--- SSL Redirection to secure shopping cart --->
<cfif application.config.ENABLE_SSLREDIRECT AND IsDefined("URL.page")>
<cfif URL.page IS "ViewCart" AND CGI.HTTPS IS "off">
<cflocation url="<cfelseif URL.page IS NOT "ViewCart" AND CGI.HTTPS IS "on">
<cflocation url="</cfif>
</cfif>
If the page is ViewCart and the CGI.HTTPS var is off redirect to the same page but at the https domain.
From the client side it works seamlessly. But behind the scenes it's throwing the following error:
struct
Detail An exception occurred when invoking a event handler method from Application.cfc The method name is: onRequestStart.
Message Event Handler Exception.
RootCause struct
Message [empty string]
StackTrace coldfusion.runtime.AbortException at coldfusion.tagext.net.LocationTag.doEndTag(LocationTag.java:161) at coldfusion.runtime.CfJspPage._emptyTag(CfJspPage.java:1916) at cfApplication2ecfc113272939$funcONREQUESTSTART.runFunction(C:\Inetpub\ at coldfusion.runtime.UDFMethod.invoke(UDFMethod.java:348) at coldfusion.runtime.UDFMethod
It works. I only see the error in the email that gets sent in the onError method of the Application.cfc. It seems to throw the error and redirect anyway. Is this a potential bug or is what I am trying to do to blame?
Thanks for any help...
Anthony