Skip to content

Commit

Permalink
Merge pull request #142 from nettum/contentlength-fix
Browse files Browse the repository at this point in the history
Fix content-length header for vcards with multibyte encodings
  • Loading branch information
jeroendesloovere authored Mar 2, 2019
2 parents 6f4627d + c7f8188 commit 21a7341
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/VCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -752,7 +752,7 @@ public function getHeaders($asAssociative)
{
$contentType = $this->getContentType() . '; charset=' . $this->getCharset();
$contentDisposition = 'attachment; filename=' . $this->getFilename() . '.' . $this->getFileExtension();
$contentLength = mb_strlen($this->getOutput(), $this->getCharset());
$contentLength = mb_strlen($this->getOutput(), '8bit');
$connection = 'close';

if ((bool)$asAssociative) {
Expand Down

0 comments on commit 21a7341

Please sign in to comment.