File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change 726726
727727 <!--- Check for method tunnelling by clients unable to send PUT/DELETE requests (e.g. Flash Player);
728728 Actual desired method will be contained in a special header --->
729- < cfset var httpMethodOverride = GetPageContext ().getRequest ().getHeader (" X-HTTP-Method-Override" ) / >
729+ < cfset var httpMethodOverride = " null" / >
730+ < cftry >
731+ < cfset httpMethodOverride = GetPageContext ().getRequest ().getHeader (" X-HTTP-Method-Override" ) / >
732+ < cfcatch type = " any" >< / cfcatch >
733+ < / cftry >
730734
731735 < cfset requestObj .uri = getPath () / >
732736 < cfif NOT len (requestObj .uri )>
738742 < / cfif >
739743 < / cfif >
740744
741- <!--- check for format in the URI --->
742- < cfset requestObj .uriFormat = formatFromURI (requestObj .uri ) / >
745+ <!--- check for format in the URI --->
746+ < cfset requestObj .uriFormat = formatFromURI (requestObj .uri ) / >
743747
744748 <!--- attempt to find the cfc for the requested uri --->
745749 < cfset requestObj .matchingRegex = matchURI (requestObj .uri ) / >
756760 < cfset requestObj .verb = cgi .request_method / >
757761
758762 <!--- Should we override the actual method based on method tunnelling? --->
759- < cfif isDefined (" httpMethodOverride" ) AND not isNull (httpMethodOverride )>
760- < cfset requestObj .verb = httpMethodOverride / >
763+ < cfif isDefined (" httpMethodOverride" ) AND not isNull (httpMethodOverride ) AND not httpMethodOverride eq " null " >
764+ < cfset requestObj .verb = httpMethodOverride / >
761765 < / cfif >
762766
763767 < cfif structKeyExists (application ._taffy .endpoints [requestObj .matchingRegex ].methods , requestObj .verb )>
You can’t perform that action at this time.
0 commit comments