Skip to content

Commit 72fe209

Browse files
committed
* Empty response codes for Adobe, due to their incredibly weird Response object nesting.
1 parent 4dde192 commit 72fe209

File tree

1 file changed

+10
-6
lines changed

1 file changed

+10
-6
lines changed

models/DebuggerService.cfc

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -502,12 +502,16 @@ component
502502
* Helper method to deal with ACF2016's overload of the page context response, come on Adobe, get your act together!
503503
*/
504504
function getPageContextResponse(){
505-
var response = getPageContext().getResponse();
506-
try {
507-
response.getStatus();
508-
return response;
509-
} catch ( any e ) {
510-
return response.getResponse();
505+
if ( server.keyExists( "lucee" ) ) {
506+
return getPageContext().getResponse();
507+
}
508+
if ( server.coldfusion.productVersion.listFirst() eq 2016 ) {
509+
return getPageContext()
510+
.getResponse()
511+
.getResponse()
512+
.getResponse();
513+
} else {
514+
return getPageContext().getResponse().getResponse();
511515
}
512516
}
513517

0 commit comments

Comments
 (0)