Railo
  1. Railo
  2. RAILO-1698

cfcontent fails when calling twice

    Details

    • Type: Bug Bug
    • Status: Resolved Resolved (View Workflow)
    • Priority: Major Major
    • Resolution: Done
    • Affects Version/s: 3.3.1.000
    • Fix Version/s: 3.3.1.010
    • Labels:
      None
    • Environment:
      Win / Unix
    • Workaround:
      Workaround Exists
    • Workaround Description:
      Hide

      Before calling cfcontent, use fileExists

      Show
      Before calling cfcontent, use fileExists
    • Similar Issues:
      Show 10 results 

      Description

      I try to deliver images with the code below. Due to performance I don´t check if the file exists. 90% of the images are available, so just in some cases an error is thown.
      If the second image should be delivered, i get an error:
      Detail: you can't rewrite head of response after the page is flushed
      Message: content ist already flushed

      <cftry>
      <cfcontent type="image/jpeg" reset="true" deletefile="false" file="C:\tmp\img1.jpg">
      <cfcatch type="any" >
      <cfcontent type="image/jpeg" reset="true" deletefile="false" file="C:\tmp\img2.jpg">
      </cfcatch>
      </cftry>
      <cfabort>

        Activity

        Hide
        Michael Offner
        added a comment -

        testcase attached

        Show
        Michael Offner
        added a comment - testcase attached
        Show
        Michael Offner
        added a comment - tnx for input https://github.com/getrailo/railo/commit/d056da05f6a3268fc6b50604f42d21c3bf334f30

          People

          • Assignee:
            Michael Offner
            Reporter:
            Akitogo Developers
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: