Skip to content

Commit 863e099

Browse files
mrrsmpbrisbin
authored andcommitted
Fix: Send correct Host header based on provided url when using curl (#121)
1 parent 3cea876 commit 863e099

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/TestReporter/ApiClient.php

+1-1
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ private function sendWithCurl($url, $payload)
8282
$curl,
8383
CURLOPT_HTTPHEADER,
8484
array(
85-
'Host: codeclimate.com',
85+
'Host: ' . parse_url($this->apiHost, PHP_URL_HOST),
8686
'Content-Type: application/json',
8787
'User-Agent: Code Climate (PHP Test Reporter v' . Version::VERSION . ')',
8888
'Content-Length: ' . strlen($payload),

0 commit comments

Comments
 (0)