Trim trailing CRLF from dot-encoded data

This commit is contained in:
Ivan Markin 2017-03-18 23:45:27 +00:00
parent 44d2fc9d7a
commit 7891df5908
1 changed files with 1 additions and 1 deletions

View File

@ -112,7 +112,7 @@ func (c *Conn) ReadResponse() (*Response, error) {
if c.debugLog {
log.Printf("S: [dot encoded data]")
}
resp.Data = append(resp.Data, string(dotBody))
resp.Data = append(resp.Data, strings.TrimRight(string(dotBody), "\n\r"))
dotLines := strings.Split(string(dotBody), "\n")
for _, dotLine := range dotLines[:len(dotLines)-1] {
resp.RawLines = append(resp.RawLines, dotLine)