src/Autodiscover.php
public function readHeaders($_ch, $str)
    {
        $pos = strpos($str, ':');
        if ($pos !== false) {
            $key = strtolower(substr($str, 0, $pos));
            $val = trim(substr($str, $pos + 1));
            $this->last_response_headers[$key] = $val;
        }

        return strlen($str);
    }
public function readHeaders($_ch, $str)
    {
        $pos = strpos($str, ':');
        if ($pos !== false) {
            $key = strtolower(substr($str, 0, $pos));
            $val = trim(substr($str, $pos + 1));
            $this->last_response_headers[$key] = $val;
        }

        return strlen($str);
    }
public function readHeaders ( $ _ch , $ str ) { $ pos = strpos ( $ str , ':' ) ; if ( $ pos !== false ) { $ key = strtolower ( substr ( $ str , 0 , $ pos ) ) ; $ val = trim ( substr ( $ str , $ pos + 1 ) ) ; $ this -> last_response_headers [ $ key ] = $ val ; } return strlen ( $ str ) ; }
Utility function to pick headers off of the incoming cURL response.
Used with CURLOPT_HEADERFUNCTION.

@param resource $_ch
cURL handle.
@param string $str
Header string to read.
@return integer
Bytes read.

@todo Determine if we can remove $_ch here.
@SuppressWarnings(PHPMD.UnusedFormalParameter)
Utility function to pick headers off of the incoming cURL response . Used with CURLOPT_HEADERFUNCTION .