fixed exception message error when CURLOPT_HEADER is not set