示例#1
0
 /**
  * This method sets the header with specified name.
  *
  * @access public
  * @param string $name                                      the name of the header
  * @param string $value                                     the value of the header
  */
 public function setHeader($name, $value)
 {
     $name = strtolower($name);
     if (!in_array($name, array('content-length'))) {
         if ($value !== null) {
             $this->headers->putEntry($name, Core\Convert::toString($value));
         } else {
             $this->headers->removeKey($name);
         }
     }
 }