Skip to content

Commit

Permalink
Add charset attribute to Content-Type headers
Browse files Browse the repository at this point in the history
  • Loading branch information
spvickers committed Sep 30, 2022
1 parent c972c70 commit 75b1561
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/System.php
Original file line number Diff line number Diff line change
Expand Up @@ -1315,7 +1315,7 @@ private function addOAuth1Signature($endpoint, $data, $method, $type, $hash, $ti
$header .= "\nAccept: {$type}";
}
} elseif (isset($type)) {
$header .= "\nContent-Type: {$type}";
$header .= "\nContent-Type: {$type}; charset=UTF-8";
$header .= "\nContent-Length: " . strlen($data);
}
return $header;
Expand Down Expand Up @@ -1469,7 +1469,7 @@ private function addJWTSignature($endpoint, $data, $method, $type, $nonce, $time
$header .= "\nAccept: {$type}";
}
} elseif (isset($type)) {
$header .= "\nContent-Type: {$type}";
$header .= "\nContent-Type: {$type}; charset=UTF-8";
if (!empty($data) && is_string($data)) {
$header .= "\nContent-Length: " . strlen($data);
}
Expand Down

0 comments on commit 75b1561

Please sign in to comment.