Development

Changeset 24619

You must first sign up to be able to contribute.

Changeset 24619

Show
Ignore:
Timestamp:
12/01/09 00:14:18 (2 years ago)
Author:
FabianLange
Message:

[1.0, 1.2, 1.3, 1.4] fixed incorrect array access of lastModified header which only was an array pre 1.0. This was effectively preventing 304 Not Modified response from working correctly. Fixed phpdoc referring to array as return type of getHttpHeader() (fixes #6633, #7539)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/filter/sfCacheFilter.class.php

    r23886 r24619  
    172172    { 
    173173      $last_modified = $this->response->getHttpHeader('Last-Modified'); 
    174       $last_modified = $last_modified[0]; 
    175174      if ($this->request->getHttpHeader('IF_MODIFIED_SINCE') == $last_modified) 
    176175      { 
  • branches/1.0/lib/response/sfWebResponse.class.php

    r23990 r24619  
    210210   * Gets HTTP header current value. 
    211211   * 
    212    * @return array 
     212   * @return string 
    213213   */ 
    214214  public function getHttpHeader($name, $default = null) 
  • branches/1.2/lib/filter/sfCacheFilter.class.php

    r17858 r24619  
    210210    { 
    211211      $lastModified = $this->response->getHttpHeader('Last-Modified'); 
    212       $lastModified = $lastModified[0]; 
    213212      if ($this->request->getHttpHeader('IF_MODIFIED_SINCE') == $lastModified) 
    214213      { 
  • branches/1.2/lib/response/sfWebResponse.class.php

    r23984 r24619  
    268268   * @param  string $default  Default value returned if named HTTP header is not found 
    269269   * 
    270    * @return array 
     270   * @return string 
    271271   */ 
    272272  public function getHttpHeader($name, $default = null) 
  • branches/1.3/lib/filter/sfCacheFilter.class.php

    r24615 r24619  
    210210    { 
    211211      $lastModified = $this->response->getHttpHeader('Last-Modified'); 
    212       $lastModified = $lastModified[0]; 
    213212      if ($this->request->getHttpHeader('IF_MODIFIED_SINCE') == $lastModified) 
    214213      { 
  • branches/1.3/lib/response/sfWebResponse.class.php

    r23984 r24619  
    268268   * @param  string $default  Default value returned if named HTTP header is not found 
    269269   * 
    270    * @return array 
     270   * @return string 
    271271   */ 
    272272  public function getHttpHeader($name, $default = null) 
  • branches/1.4/lib/filter/sfCacheFilter.class.php

    r24615 r24619  
    210210    { 
    211211      $lastModified = $this->response->getHttpHeader('Last-Modified'); 
    212       $lastModified = $lastModified[0]; 
    213212      if ($this->request->getHttpHeader('IF_MODIFIED_SINCE') == $lastModified) 
    214213      { 
  • branches/1.4/lib/response/sfWebResponse.class.php

    r23984 r24619  
    268268   * @param  string $default  Default value returned if named HTTP header is not found 
    269269   * 
    270    * @return array 
     270   * @return string 
    271271   */ 
    272272  public function getHttpHeader($name, $default = null)