From fdd2e7216d53c9a145a306a27002eedde30b5ac6 Mon Sep 17 00:00:00 2001 From: Ryan Cramer Date: Wed, 26 Jun 2019 10:51:30 -0400 Subject: [PATCH] Fix issue processwire/processwire-issues#884 --- wire/core/WireHttp.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/wire/core/WireHttp.php b/wire/core/WireHttp.php index 0ae9cbe3..ba918b68 100644 --- a/wire/core/WireHttp.php +++ b/wire/core/WireHttp.php @@ -609,7 +609,11 @@ class WireHttp extends Wire { } if(count($this->headers)) { - curl_setopt($curl, CURLOPT_HTTPHEADER, $this->headers); + $headers = array(); + foreach($this->headers as $name => $value) { + $headers[] = "$name: $value"; + } + curl_setopt($curl, CURLOPT_HTTPHEADER, $headers); } if($method == 'POST') {