Mage_Core_Controller_Response_Http Class Reference

List of all members.

Public Member Functions

 outputBody ()
 sendHeaders ()


Detailed Description

Custom Zend_Controller_Response_Http class (formally)

Author:
Magento Core Team <core@magentocommerce.com>

Definition at line 33 of file Http.php.


Member Function Documentation

outputBody (  ) 

Definition at line 35 of file Http.php.

00036     {
00037         Mage::getSingleton('core/translate_inline')->processResponseBody($this->_body);
00038         parent::outputBody();
00039     }

sendHeaders (  ) 

Fixes CGI only one Status header allowed bug

http://bugs.php.net/bug.php?id=36705

Definition at line 47 of file Http.php.

00048     {
00049         if (!$this->canSendHeaders()) {
00050             Mage::log('HEADERS ALREADY SENT: '.mageDebugBacktrace(true, true, true));
00051             return $this;
00052         }
00053 
00054         if (substr(php_sapi_name(), 0, 3) == 'cgi') {
00055             $statusSent = false;
00056             foreach ($this->_headersRaw as $i=>$header) {
00057                 if (stripos($header, 'status:')===0) {
00058                     if ($statusSent) {
00059                         unset($this->_headersRaw[$i]);
00060                     } else {
00061                         $statusSent = true;
00062                     }
00063                 }
00064             }
00065             foreach ($this->_headers as $i=>$header) {
00066                 if (strcasecmp($header['name'], 'status')===0) {
00067                     if ($statusSent) {
00068                         unset($this->_headers[$i]);
00069                     } else {
00070                         $statusSent = true;
00071                     }
00072                 }
00073             }
00074         }
00075         parent::sendHeaders();
00076     }


The documentation for this class was generated from the following file:

Generated on Sat Jul 4 17:23:54 2009 for Magento by  doxygen 1.5.8