Skip to content

Commit bdfa90a

Browse files
authored
Merge pull request #624 from CommonGateway/fix/owo/check-if-header-exists
Check if header exists before forcing it
2 parents 7d6f697 + 362caf7 commit bdfa90a

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Service/RequestService.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -817,7 +817,7 @@ public function proxyHandler(array $data, array $configuration, ?Source $proxy =
817817
unset($headers['Content-Length']);
818818
}
819819

820-
if ($data['accept'] !== $headers['content-type'][0]) {
820+
if (isset($headers['content-type']) === false || $data['accept'] !== $headers['content-type'][0]) {
821821
$headers['content-type'] = $data['accept'];
822822
}
823823

0 commit comments

Comments
 (0)