Skip to content
This repository has been archived by the owner on Dec 7, 2019. It is now read-only.

Commit

Permalink
Merge pull request #18 from sbo-develop/sb-patch-content-length
Browse files Browse the repository at this point in the history
Add content length

Conflicts:
	library/Gcm/Client.php
  • Loading branch information
weierophinney committed May 8, 2018
2 parents 8eb2eef + f69c2b2 commit f55c2cc
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion library/Gcm/Client.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,8 @@ public function send(Message $message)
$client = $this->getHttpClient();
$client->setUri(self::SERVER_URI);
$headers = $client->getRequest()->getHeaders();
$headers->addHeaderLine('Authorization', 'key='.$this->getApiKey());
$headers->addHeaderLine('Authorization', 'key=' . $this->getApiKey());
$headers->addHeaderLine('Content-length', mb_strlen($message->toJson()));

$response = $client->setHeaders($headers)
->setMethod('POST')
Expand Down

0 comments on commit f55c2cc

Please sign in to comment.