Delete starting empty line

When header is empty it shouldn't add an starting empty
new line
bug/bundler_fix
jvazquez-r7 2014-11-05 11:42:35 -06:00
parent ebb8b70472
commit 741f99f118
1 changed files with 7 additions and 1 deletions

View File

@ -125,7 +125,13 @@ class Message
end
def to_s
msg = force_crlf(self.header.to_s + "\r\n")
header_string = self.header.to_s
if header_string.empty?
msg = ''
else
msg = force_crlf(self.header.to_s + "\r\n")
end
unless self.content.blank?
msg << force_crlf(self.content + "\r\n")