From 4a829af677ff7545a3578bb0e93786663c9203f3 Mon Sep 17 00:00:00 2001 From: Christian Weiske Date: Thu, 8 Sep 2016 08:02:45 +0200 Subject: [PATCH] Word-Case headers; too many applications break without it --- src/shpub/Request.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/shpub/Request.php b/src/shpub/Request.php index 96d7d44..37dd6ab 100644 --- a/src/shpub/Request.php +++ b/src/shpub/Request.php @@ -45,7 +45,8 @@ class Request $command .= ' -X ' . $this->req->getMethod(); } foreach ($this->req->getHeaders() as $key => $val) { - $command .= ' -H ' . escapeshellarg($key . ': ' . $val); + $caseKey = implode('-', array_map('ucfirst', explode('-', $key))); + $command .= ' -H ' . escapeshellarg($caseKey . ': ' . $val); } $command .= ' --data ' . escapeshellarg($this->req->getBody()); $command .= ' ' . escapeshellarg((string) $this->req->getUrl()); -- 2.30.2