Skip to content

Commit f04868f

Browse files
authored
Fix frontController checks to account for CFC execution (#600)
* fix conditionals for Boxlang detection which affect Testbox CFC execution results * format updates
1 parent 5faa9cb commit f04868f

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

system/modules/HTMLHelper/models/HTMLHelper.cfc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2937,7 +2937,7 @@ component
29372937
private string function prepareBaseLink( boolean noBaseURL = false, src ){
29382938
var baseURL = replaceNoCase(
29392939
requestService.getContext().getSESbaseURL(),
2940-
findNoCase( ".cfm", cgi.script_name ) ? "index.cfm" : "index.bxm",
2940+
findNoCase( ".bx", cgi.script_name ) ? "index.bxm" : "index.cfm",
29412941
""
29422942
);
29432943
// return if base is eempty

system/web/routing/Router.cfc

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,7 @@ component
194194
* This is ONLY called by the routing services and only ONCE in the Application Life-Cycle
195195
*/
196196
function startup(){
197-
var frontController = findNoCase( ".cfm", cgi.script_name ) ? "index.cfm" : "index.bxm";
197+
var frontController = findNoCase( ".bx", cgi.script_name ) ? "index.bxm" : "index.cfm";
198198

199199
// Verify baseUrl is still empty to default it for operation
200200
if ( !len( variables.baseUrl ) ) {
@@ -2074,7 +2074,7 @@ component
20742074
* Composes the base routing path with no host or protocol
20752075
*/
20762076
string function composeRoutingPath(){
2077-
var base = findNoCase( ".cfm", cgi.script_name ) ? "index.cfm" : "index.bxm";
2077+
var base = findNoCase( ".bx", cgi.script_name ) ? "index.bxm" : "index.cfm";
20782078
return variables.controller.getSetting( "RoutingAppMapping" ) & // routing app mapping
20792079
( variables.fullRewrites ? "" : base ); // full or controller routing
20802080
}

0 commit comments

Comments
 (0)