Skip to content

Commit 695572d

Browse files
committed
Merge branch 'development'
2 parents ed5a837 + c4d1e45 commit 695572d

File tree

3 files changed

+25
-1
lines changed

3 files changed

+25
-1
lines changed

box.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22
"name":"ColdBox Debugger",
33
"author":"Ortus Solutions <[email protected]",
44
"location":"https://downloads.ortussolutions.com/ortussolutions/coldbox-modules/cbdebugger/@build.version@/[email protected]@.zip",
5-
"version":"3.1.0",
5+
"version":"3.1.1",
66
"slug":"cbdebugger",
77
"type":"modules",
88
"homepage":"https://github.com/coldbox-modules/cbdebugger",

changelog.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,15 @@ All notable changes to this project will be documented in this file.
55
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
66
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
77

8+
9+
----
10+
11+
## [3.1.1] => 2021-JUN-05
12+
13+
### Fixed
14+
15+
* Do not render when the request's content type is NOT html
16+
817
----
918

1019
## [3.1.0] => 2021-MAy-19

interceptors/RequestCollector.cfc

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -95,6 +95,8 @@ component extends="coldbox.system.Interceptor" {
9595

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

243245
/************************************** PRIVATE METHODS *********************************************/
244246

247+
/**
248+
* Helper method to deal with ACF2016's overload of the page context response, come on Adobe, get your act together!
249+
**/
250+
private function getPageContextResponse(){
251+
var response = getPageContext().getResponse();
252+
try {
253+
response.getStatus();
254+
return response;
255+
} catch ( any e ) {
256+
return response.getResponse();
257+
}
258+
}
259+
245260
/**
246261
* Execute Debugger Commands
247262
*/

0 commit comments

Comments
 (0)