net/smtp: fix auth encoding to not add extra CRLFs

Closes PR 12501
This commit is contained in:
Matthew Flatt 2012-02-20 08:23:46 -07:00
parent a12f9831a3
commit b656219f8a

View File

@ -96,11 +96,11 @@
(when auth-user (when auth-user
(log "auth\n") (log "auth\n")
(fprintf w "AUTH PLAIN ~a" (fprintf w "AUTH PLAIN ~a\r\n"
;; Encoding adds CRLF
(base64-encode (base64-encode
(string->bytes/latin-1 (string->bytes/latin-1
(format "~a\0~a\0~a" auth-user auth-user auth-passwd)))) (format "~a\0~a\0~a" auth-user auth-user auth-passwd))
#""))
(check-reply r 235 w)) (check-reply r 235 w))
(log "from\n") (log "from\n")