Skip to content

Commit 362caf7

Browse files
committed
Check if header exists before forcing it
1 parent 7d6f697 commit 362caf7

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

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)