Uploaded image for project: 'eZ Publish / Platform'
  1. eZ Publish / Platform
  2. EZP-19206

REST api: responses broken when enabling eZ debug mode

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Medium Medium
    • Resolution: Unresolved
    • Affects Version/s: 2012.1, 4.7.0-dev
    • Fix Version/s: None
    • Labels:
      None

      Description

      When enabling debug mode in eZ (DebugOutput=enabled), responses from the REST API do not get any more the correct http headers set.
      This is inconvenient for the mimetype missing for json, but it is more inconvenient that an 404 or 403 response get truned into an 200 OK one.

      The problem comes from the call to flush() in eZDebug::printReportInternal().
      That call happens from within the contentx of an ob_start()/ob_end() setup, but it still flushes the http headers (nb: might be a php bug, will have to investigate further. Anyway, it happens on php 5.3)

      The easy fix: remove that flush() call

        Issue Links

          Activity

          Hide
          Gaetano Giunta added a comment -

          has been committed afaik, should be closed

          Show
          Gaetano Giunta added a comment - has been committed afaik, should be closed

            People

            • Assignee:
              unknown
              Reporter:
              Gaetano Giunta
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated: