You are here

function HTTP_Response::_processHeader in Flickr API 5

Processes the response header

@access private

Parameters

string HTTP header:

1 call to HTTP_Response::_processHeader()
HTTP_Response::process in phpFlickr/PEAR/HTTP/Request.php
Processes a HTTP response

File

phpFlickr/PEAR/HTTP/Request.php, line 1266

Class

HTTP_Response
Response class to complement the Request class

Code

function _processHeader($header) {
  if (false === strpos($header, ':')) {
    return;
  }
  list($headername, $headervalue) = explode(':', $header, 2);
  $headername = strtolower($headername);
  $headervalue = ltrim($headervalue);
  if ('set-cookie' != $headername) {
    if (isset($this->_headers[$headername])) {
      $this->_headers[$headername] .= ',' . $headervalue;
    }
    else {
      $this->_headers[$headername] = $headervalue;
    }
  }
  else {
    $this
      ->_parseCookie($headervalue);
  }
}