Trim trailing CRLF from dot-encoded data
This commit is contained in:
parent
44d2fc9d7a
commit
7891df5908
|
@ -112,7 +112,7 @@ func (c *Conn) ReadResponse() (*Response, error) {
|
||||||
if c.debugLog {
|
if c.debugLog {
|
||||||
log.Printf("S: [dot encoded data]")
|
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")
|
dotLines := strings.Split(string(dotBody), "\n")
|
||||||
for _, dotLine := range dotLines[:len(dotLines)-1] {
|
for _, dotLine := range dotLines[:len(dotLines)-1] {
|
||||||
resp.RawLines = append(resp.RawLines, dotLine)
|
resp.RawLines = append(resp.RawLines, dotLine)
|
||||||
|
|
Reference in New Issue