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 726
726
727
727
<!--- Check for method tunnelling by clients unable to send PUT/DELETE requests (e.g. Flash Player);
728
728
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 >
730
734
731
735
< cfset requestObj .uri = getPath () / >
732
736
< cfif NOT len (requestObj .uri )>
738
742
< / cfif >
739
743
< / cfif >
740
744
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 ) / >
743
747
744
748
<!--- attempt to find the cfc for the requested uri --->
745
749
< cfset requestObj .matchingRegex = matchURI (requestObj .uri ) / >
756
760
< cfset requestObj .verb = cgi .request_method / >
757
761
758
762
<!--- 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 / >
761
765
< / cfif >
762
766
763
767
< cfif structKeyExists (application ._taffy .endpoints [requestObj .matchingRegex ].methods , requestObj .verb )>
You can’t perform that action at this time.
0 commit comments