Skip to content

Commit 3f136b5

Browse files
committed
Capitalize 'Content-Type' for maximum compatibility
1 parent 34d09a8 commit 3f136b5

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/Elasticsearch/ClientBuilder.php

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -489,16 +489,16 @@ public function build()
489489
$this->connectionParams = [];
490490
}
491491

492-
// Make sure we are setting Content-type and Accept (unless the user has explicitly
492+
// Make sure we are setting Content-Type and Accept (unless the user has explicitly
493493
// overridden it
494494
if (isset($this->connectionParams['client']['headers']) === false) {
495495
$this->connectionParams['client']['headers'] = [
496-
'Content-type' => ['application/json'],
496+
'Content-Type' => ['application/json'],
497497
'Accept' => ['application/json']
498498
];
499499
} else {
500-
if (isset($this->connectionParams['client']['headers']['Content-type']) === false) {
501-
$this->connectionParams['client']['headers']['Content-type'] = ['application/json'];
500+
if (isset($this->connectionParams['client']['headers']['Content-Type']) === false) {
501+
$this->connectionParams['client']['headers']['Content-Type'] = ['application/json'];
502502
}
503503
if (isset($this->connectionParams['client']['headers']['Accept']) === false) {
504504
$this->connectionParams['client']['headers']['Accept'] = ['application/json'];

0 commit comments

Comments
 (0)