Skip to content

Commit

Permalink
Merge pull request #86 from Musiksammler/issue-85
Browse files Browse the repository at this point in the history
#85: fix for getting the correct content-length
  • Loading branch information
jeroendesloovere authored Feb 14, 2017
2 parents 6529ca5 + 1a3e04f commit 97f9937
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/VCard.php
Original file line number Diff line number Diff line change
Expand Up @@ -526,7 +526,7 @@ protected function fold($text)
// split, wrap and trim trailing separator
return substr(chunk_split($text, 73, "\r\n "), 0, -3);
}

/**
* Escape newline characters according to RFC2425 section 5.8.4.
*
Expand All @@ -538,7 +538,7 @@ protected function escape($text)
{
$text = str_replace("\r\n", "\\n", $text);
$text = str_replace("\n", "\\n", $text);

return $text;
}

Expand Down Expand Up @@ -622,7 +622,7 @@ public function getHeaders($asAssociative)
{
$contentType = $this->getContentType() . '; charset=' . $this->getCharset();
$contentDisposition = 'attachment; filename=' . $this->getFilename() . '.' . $this->getFileExtension();
$contentLength = strlen($this->getOutput());
$contentLength = mb_strlen($this->getOutput(), $this->getCharset());
$connection = 'close';

if ((bool) $asAssociative) {
Expand Down

0 comments on commit 97f9937

Please sign in to comment.