Uploaded image for project: 'Railo'
  1. Railo
  2. RAILO-1698

cfcontent fails when calling twice

    Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: 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

      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>

        Gliffy Diagrams

          Activity

          Hide
          micstriit Michael Offner added a comment -

          testcase attached

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

            People

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

              Dates

              • Created:
                Updated:
                Resolved:

                Development