aboutsummaryrefslogtreecommitdiff
path: root/libgo/go/smtp/smtp.go
diff options
context:
space:
mode:
authorIan Lance Taylor <ian@gcc.gnu.org>2011-09-16 15:47:21 +0000
committerIan Lance Taylor <ian@gcc.gnu.org>2011-09-16 15:47:21 +0000
commitadb0401dac41c81571722312d4586b2693f95aa6 (patch)
treeea2b52e3c258d6b6d9356977c683c7f72a4a5fd5 /libgo/go/smtp/smtp.go
parent5548ca3540bccbc908a45942896d635ea5f1c23f (diff)
downloadgcc-adb0401dac41c81571722312d4586b2693f95aa6.zip
gcc-adb0401dac41c81571722312d4586b2693f95aa6.tar.gz
gcc-adb0401dac41c81571722312d4586b2693f95aa6.tar.bz2
Update Go library to r60.
From-SVN: r178910
Diffstat (limited to 'libgo/go/smtp/smtp.go')
-rw-r--r--libgo/go/smtp/smtp.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/libgo/go/smtp/smtp.go b/libgo/go/smtp/smtp.go
index 3f89af1..2d5e862 100644
--- a/libgo/go/smtp/smtp.go
+++ b/libgo/go/smtp/smtp.go
@@ -93,11 +93,11 @@ func (c *Client) ehlo() os.Error {
return err
}
ext := make(map[string]string)
- extList := strings.Split(msg, "\n", -1)
+ extList := strings.Split(msg, "\n")
if len(extList) > 1 {
extList = extList[1:]
for _, line := range extList {
- args := strings.Split(line, " ", 2)
+ args := strings.SplitN(line, " ", 2)
if len(args) > 1 {
ext[args[0]] = args[1]
} else {
@@ -106,7 +106,7 @@ func (c *Client) ehlo() os.Error {
}
}
if mechs, ok := ext["AUTH"]; ok {
- c.auth = strings.Split(mechs, " ", -1)
+ c.auth = strings.Split(mechs, " ")
}
c.ext = ext
return err
@@ -151,8 +151,7 @@ func (c *Client) Auth(a Auth) os.Error {
var msg []byte
switch code {
case 334:
- msg = make([]byte, encoding.DecodedLen(len(msg64)))
- _, err = encoding.Decode(msg, []byte(msg64))
+ msg, err = encoding.DecodeString(msg64)
case 235:
// the last message isn't base64 because it isn't a challenge
msg = []byte(msg64)