Rebuild the debug property from the raw headers passed to the new
CURLOPT_HEADERFUNCTION and the response body. This will match the raw
HTTP response more than previously. It will also contain all the
redirecting steps and HTTP status lines.
CURLOPT_HEADERFUNCTION is the recommended method for collecting the
response headers. Because every request in the redirect chain contains
headers (at the minimum a location line), we can track which URL’s
headers are being parsed and collect a history of URLs.