Skip to content

Instantly share code, notes, and snippets.

@boughtonp
Created January 24, 2012 01:23
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save boughtonp/1667153 to your computer and use it in GitHub Desktop.
Save boughtonp/1667153 to your computer and use it in GitHub Desktop.
Function to return request timeout for Railo.
<cffunction name="getRequestTimeout" output="false">
<cfadmin
type="web" password="yourwebadminpassword"
action="getApplicationSetting"
returnvariable="local.DefaultAppSettings"
/>
<cfif DefaultAppSettings.AllowURLRequestTimeout AND StructKeyExists(Url,'RequestTimeout')>
<cfreturn createTimespan( 0 , 0 , 0 , Url.RequestTimeout ) />
</cfif>
<cfset local.CurAppSettings = getApplicationSettings() />
<cfif StructKeyExists(CurAppSettings,'RequestTimeout')>
<cfreturn CurAppSettings.RequestTimeout />
</cfif>
<cfreturn DefaultAppSettings.RequestTimeout />
</cffunction>
<cfdump eval=getRequestTimeout() />
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment