Uploaded image for project: 'ColdBox Platform'
  1. COLDBOX-528

Coldbox Event Cache discards the Content-Type when caching non renderdata results

    Details

    • Type: Bug
    • Status: Resolved (View workflow)
    • Priority: Major
    • Resolution: Fixed
    • Affects versions: None
    • Fix versions: 4.3.0
    • Components: Bootstrapper
    • Labels:
      None

      Description

      I am working with an older version of coldbox, but I perceive that the issue still exists in the current version. Event Caching fails to provide a content type if the request is not binary. I made two changes to my local copy of coldbox to resolve this issue. My changes were in Coldbox.cfm but I think that was renamed to Bootstrap.cfm.

      The code below is a reference point. Note that the code calls writeOutput but does not set the content type.

      // check renderdata
      				if( refResults.eventCaching.renderData ){
      					refResults.eventCaching.controller = cbController;
      					renderDataSetup( argumentCollection=refResults.eventCaching );
      				}
      				// Authoritative Header
      				getPageContext().getResponse().setStatus( 203, "Non-Authoritative Information" );
      				// Render Content as binary or just output
      				if( refResults.eventCaching.isBinary ){
      					cbController.getDataMarshaller().renderContent( type="#refResults.eventCaching.contentType#", variable="#refResults.eventCaching.renderedContent#" );
      				} else {
      					writeOutput( refResults.eventCaching.renderedContent );
      				}
      

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                lmajano Luis Majano
                Reporter:
                calvind Calvin Dallimore
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: