Skip to content

Commit

Permalink
Merge branch 'development'
Browse files Browse the repository at this point in the history
  • Loading branch information
lmajano committed Jun 5, 2021
2 parents ed5a837 + c4d1e45 commit 695572d
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion box.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name":"ColdBox Debugger",
"author":"Ortus Solutions <[email protected]",
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbdebugger/@build.version@/[email protected]@.zip",
"version":"3.1.0",
"version":"3.1.1",
"slug":"cbdebugger",
"type":"modules",
"homepage":"https://github.com/coldbox-modules/cbdebugger",
Expand Down
9 changes: 9 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).


----

## [3.1.1] => 2021-JUN-05

### Fixed

* Do not render when the request's content type is NOT html

----

## [3.1.0] => 2021-MAy-19
Expand Down
15 changes: 15 additions & 0 deletions interceptors/RequestCollector.cfc
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@ component extends="coldbox.system.Interceptor" {

// Determine if we can render the debugger at the bottom of the request
if (
// Check content type on request
findNoCase( "html", getPageContextResponse().getContentType() ) AND
// Is the debug mode turned on
variables.debuggerService.getDebugMode() AND
// Has it not been disabled by the user programmatically
Expand Down Expand Up @@ -242,6 +244,19 @@ component extends="coldbox.system.Interceptor" {

/************************************** PRIVATE METHODS *********************************************/

/**
* Helper method to deal with ACF2016's overload of the page context response, come on Adobe, get your act together!
**/
private function getPageContextResponse(){
var response = getPageContext().getResponse();
try {
response.getStatus();
return response;
} catch ( any e ) {
return response.getResponse();
}
}

/**
* Execute Debugger Commands
*/
Expand Down

0 comments on commit 695572d

Please sign in to comment.