git.cweiske.de
/
shpub.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
e843188
)
Word-Case headers; too many applications break without it
author
Christian Weiske
<
[email protected]
>
Thu, 8 Sep 2016 06:02:45 +0000
(08:02 +0200)
committer
Christian Weiske
<
[email protected]
>
Thu, 8 Sep 2016 06:02:45 +0000
(08:02 +0200)
src/shpub/Request.php
patch
|
blob
|
history
diff --git
a/src/shpub/Request.php
b/src/shpub/Request.php
index 96d7d44142c2dcb3991343df06c81809d3e8d5ce..37dd6ab78806247253bb7afda79655cce9384e6b 100644
(file)
--- 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());