diff options
author | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 15:47:21 +0000 |
---|---|---|
committer | Ian Lance Taylor <ian@gcc.gnu.org> | 2011-09-16 15:47:21 +0000 |
commit | adb0401dac41c81571722312d4586b2693f95aa6 (patch) | |
tree | ea2b52e3c258d6b6d9356977c683c7f72a4a5fd5 /libgo/go/smtp/smtp.go | |
parent | 5548ca3540bccbc908a45942896d635ea5f1c23f (diff) | |
download | gcc-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.go | 9 |
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) |