Skip to content

Commit

Permalink
Use null when creating stream if StringBody contains empty string
Browse files Browse the repository at this point in the history
  • Loading branch information
trowski committed Jul 30, 2019
1 parent 7c5862a commit 39b5a3b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Body/StringBody.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ public function __construct(string $body)

public function createBodyStream(): InputStream
{
return new InMemoryStream($this->body);
return new InMemoryStream(\strlen($this->body) ? $this->body : null);
}

public function getHeaders(): Promise
Expand Down

0 comments on commit 39b5a3b

Please sign in to comment.