Skip to content

Commit

Permalink
Ensure strings in HTTP Headers
Browse files Browse the repository at this point in the history
  • Loading branch information
jeromegamez committed Oct 5, 2021
1 parent 7cb7138 commit 571691a
Show file tree
Hide file tree
Showing 7 changed files with 7 additions and 7 deletions.
2 changes: 1 addition & 1 deletion src/Firebase/Auth/CreateActionLink/ApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ public function __construct(CreateActionLink $action)

$headers = \array_filter([
'Content-Type' => 'application/json; charset=UTF-8',
'Content-Length' => $body->getSize(),
'Content-Length' => (string) $body->getSize(),
]);

$this->wrappedRequest = new Request('POST', $uri, $headers, $body);
Expand Down
2 changes: 1 addition & 1 deletion src/Firebase/Auth/CreateSessionCookie/ApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ public function __construct(CreateSessionCookie $action)

$headers = \array_filter([
'Content-Type' => 'application/json; charset=UTF-8',
'Content-Length' => $body->getSize(),
'Content-Length' => (string) $body->getSize(),
]);

$this->wrappedRequest = new Request('POST', $uri, $headers, $body);
Expand Down
2 changes: 1 addition & 1 deletion src/Firebase/Auth/SendActionLink/ApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public function __construct(SendActionLink $action)

$headers = \array_filter([
'Content-Type' => 'application/json; charset=UTF-8',
'Content-Length' => $body->getSize(),
'Content-Length' => (string) $body->getSize(),
'X-Firebase-Locale' => $action->locale(),
]);

Expand Down
2 changes: 1 addition & 1 deletion src/Firebase/DynamicLink/CreateDynamicLink/ApiRequest.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(CreateDynamicLink $action)

$headers = [
'Content-Type' => 'application/json; charset=UTF-8',
'Content-Length' => $body->getSize(),
'Content-Length' => (string) $body->getSize(),
];

$this->wrappedRequest = new Request('POST', $uri, $headers, $body);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ public function __construct(ShortenLongDynamicLink $action)

$headers = [
'Content-Type' => 'application/json; charset=UTF-8',
'Content-Length' => $body->getSize(),
'Content-Length' => (string) $body->getSize(),
];

$this->wrappedRequest = new Request('POST', $uri, $headers, $body);
Expand Down
2 changes: 1 addition & 1 deletion src/Firebase/Messaging/Http/Request/SendMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public function __construct(string $projectId, Message $message, bool $validateO
$body = Utils::streamFor(JSON::encode(['message' => $message, 'validate_only' => $validateOnly]));
$headers = [
'Content-Type' => 'application/json; charset=UTF-8',
'Content-Length' => $body->getSize(),
'Content-Length' => (string) $body->getSize(),
];

$this->wrappedRequest = new Request('POST', $uri, $headers, $body);
Expand Down
2 changes: 1 addition & 1 deletion src/Firebase/Messaging/Http/Request/ValidateMessage.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ public function __construct(string $projectId, Message $message)
$body = Utils::streamFor(JSON::encode(['message' => $message, 'validate_only' => true]));
$headers = [
'Content-Type' => 'application/json; charset=UTF-8',
'Content-Length' => $body->getSize(),
'Content-Length' => (string) $body->getSize(),
];

$this->wrappedRequest = new Request('POST', $uri, $headers, $body);
Expand Down

0 comments on commit 571691a

Please sign in to comment.