You are here

function cc::http_parse_response in Constant Contact 6.2

* This method parses the raw http response into local variables we use later on * * * @access private

1 call to cc::http_parse_response()
cc::http_send in ./class.cc.php
* This does most the work of creating the HTTP request * *

File

./class.cc.php, line 1852

Class

cc
@file

Code

function http_parse_response() {
  $this->http_response = str_replace("\r\n", "\n", $this->http_response);
  list($headers, $body) = explode("\n\n", $this->http_response, 2);
  $body_pos = strpos($body, "\n");
  if (!is_null($this->http_content_type)) {
    $body = $body_pos !== false ? substr($body, $body_pos) : $body;

    /* removes content-length value */
  }
  $this->http_response_body = $body;
  $this
    ->http_parse_headers($headers);
  $this
    ->http_set_content_type($this->http_default_content_type);
}