Zend Framework

Zend_Cache_Frontend_Page: config option "debug_header" breaks "memorize_headers"

Details

  • Type: Bug Bug
  • Status: Resolved Resolved
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: 1.6.1
  • Fix Version/s: 1.7.8
  • Component/s: Zend_Cache
  • Labels:
    None

Description

When using a Zend_Cache_Frontent_Page with the config_option "debug_header" set to true no cached headers will be replayed during a cache hit.

this is due to the fact that the code block that would normally replay stored headers will only get executed if no headers have been sent before. when one enables the debug_header option, an echo statement will be executed (in the code that echo statement is located exactly two lines above) in case of a cache hit, which will trigger a header "Content-Type: text/html" to be sent.

my suggestion is to simply bring the echo statement below the header replaying block, which should basically allow both features to co-exist.

i've tested this issue on ZF 1.6.1, however looking at http://framework.zend.com/svn/framework/standard/trunk/library/Zend/Cache/Frontend/Page.php i see that the code in question is still unchanged.

Activity

Hide
Jakob Ketterl added a comment -

i've created a simple path for this bug that fixes the problem for me.

Show
Jakob Ketterl added a comment - i've created a simple path for this bug that fixes the problem for me.
Hide
Fabien MARTY added a comment -

thanks for the issue and for the patch, fixed in trunk and in 1.7 branch

Show
Fabien MARTY added a comment - thanks for the issue and for the patch, fixed in trunk and in 1.7 branch

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: