Development

Changeset 23984

You must first sign up to be able to contribute.

Changeset 23984

Show
Ignore:
Timestamp:
11/15/09 20:54:59 (3 years ago)
Author:
FabianLange
Message:

[1.0, 1.2, 1.3, 1.4] not setting status header for servers in cgi-sapi mode (fixes #3191)

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branches/1.0/lib/response/sfWebResponse.class.php

    r23543 r23984  
    260260  public function sendHttpHeaders() 
    261261  { 
     262    $headers = $this->getParameterHolder()->getAll('symfony/response/http/headers') 
     263 
    262264    // status 
    263265    $status = 'HTTP/1.0 '.$this->statusCode.' '.$this->statusText; 
    264266    header($status); 
    265267 
     268    if (substr(php_sapi_name(), 0, 3) == 'cgi') 
     269    { 
     270      // fastcgi servers cannot send this status information because it was sent by them already due to the HTT/1.0 line 
     271      // so we can safely unset them. see ticket #3191 
     272      unset($headers['Status']); 
     273    } 
     274 
    266275    if (sfConfig::get('sf_logging_enabled')) 
    267276    { 
     
    270279 
    271280    // headers 
    272     foreach ($this->getParameterHolder()->getAll('symfony/response/http/headers') as $name => $value) 
     281    foreach ($headers as $name => $value) 
    273282    { 
    274283      header($name.': '.$value); 
  • branches/1.2/lib/response/sfWebResponse.class.php

    r17749 r23984  
    335335    header($status); 
    336336 
     337    if (substr(php_sapi_name(), 0, 3) == 'cgi') 
     338    { 
     339      // fastcgi servers cannot send this status information because it was sent by them already due to the HTT/1.0 line 
     340      // so we can safely unset them. see ticket #3191 
     341      unset($this->headers['Status']); 
     342    } 
     343 
    337344    if ($this->options['logging']) 
    338345    { 
     
    345352      $this->setContentType($this->options['content_type']); 
    346353    } 
     354 
    347355    foreach ($this->headers as $name => $value) 
    348356    { 
  • branches/1.3/lib/response/sfWebResponse.class.php

    r23720 r23984  
    336336    header($status); 
    337337 
     338    if (substr(php_sapi_name(), 0, 3) == 'cgi') 
     339    { 
     340      // fastcgi servers cannot send this status information because it was sent by them already due to the HTT/1.0 line 
     341      // so we can safely unset them. see ticket #3191 
     342      unset($this->headers['Status']); 
     343    } 
     344 
    338345    if ($this->options['logging']) 
    339346    { 
  • branches/1.4/lib/response/sfWebResponse.class.php

    r23720 r23984  
    336336    header($status); 
    337337 
     338    if (substr(php_sapi_name(), 0, 3) == 'cgi') 
     339    { 
     340      // fastcgi servers cannot send this status information because it was sent by them already due to the HTT/1.0 line 
     341      // so we can safely unset them. see ticket #3191 
     342      unset($this->headers['Status']); 
     343    } 
     344 
    338345    if ($this->options['logging']) 
    339346    {