Skip to content

Commit

Permalink
Fix: Send correct Host header based on provided url when using curl (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
mrrsm authored and pbrisbin committed Apr 21, 2017
1 parent 3cea876 commit 863e099
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/TestReporter/ApiClient.php
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,7 @@ private function sendWithCurl($url, $payload)
$curl,
CURLOPT_HTTPHEADER,
array(
'Host: codeclimate.com',
'Host: ' . parse_url($this->apiHost, PHP_URL_HOST),
'Content-Type: application/json',
'User-Agent: Code Climate (PHP Test Reporter v' . Version::VERSION . ')',
'Content-Length: ' . strlen($payload),
Expand Down

0 comments on commit 863e099

Please sign in to comment.