Fix issue where a str was sometimes returned

This issue would only occur if the bytes string was decodable, so the
fix, body.encode(), will always succeed.