Use cURL to parse headers out from the request instead of use a preg_match.

See #2142949: Receiving error message - Notice: Undefined offset: 1 in chr_curl_http_request()

Comments

minorOffense created an issue.