aboutsummaryrefslogtreecommitdiff
path: root/src/net/textproto/reader.go
diff options
context:
space:
mode:
authorDidier Spezia <didier.06@gmail.com>2015-10-10 16:53:09 +0000
committerBrad Fitzpatrick <bradfitz@golang.org>2015-10-11 16:46:15 +0000
commit6f772787f97720aeeb98d37b2c63b1a3155588d1 (patch)
tree75f551c864da32c65182c35047c6cf82c0f77815 /src/net/textproto/reader.go
parentc478c48597e2fb7c52ea39d1dde51448949860ce (diff)
downloadgo-6f772787f97720aeeb98d37b2c63b1a3155588d1.tar.xz
net/textproto: properly trim continued lines in MIME headers
A MIME header can include values defined on several lines. Only the first line of each value was trimmed. Make sure all the lines are trimmed before being aggregated. Fixes #11204 Change-Id: Id92f384044bc6c4ca836e5dba2081fe82c82dc85 Reviewed-on: https://go-review.googlesource.com/15683 Reviewed-by: Brad Fitzpatrick <bradfitz@golang.org> Run-TryBot: Brad Fitzpatrick <bradfitz@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org>
Diffstat (limited to 'src/net/textproto/reader.go')
-rw-r--r--src/net/textproto/reader.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/net/textproto/reader.go b/src/net/textproto/reader.go
index 91303fec61..17edfadad2 100644
--- a/src/net/textproto/reader.go
+++ b/src/net/textproto/reader.go
@@ -150,7 +150,7 @@ func (r *Reader) readContinuedLineSlice() ([]byte, error) {
break
}
r.buf = append(r.buf, ' ')
- r.buf = append(r.buf, line...)
+ r.buf = append(r.buf, trim(line)...)
}
return r.buf, nil
}