Skip to content

Instantly share code, notes, and snippets.

Created January 3, 2013 10:24
Show Gist options
  • Save anonymous/4442462 to your computer and use it in GitHub Desktop.
Save anonymous/4442462 to your computer and use it in GitHub Desktop.
CL-SMTPでSSLを利用するときのexternal formatの扱いの修正
--- /home/manabu/quicklisp/dists/quicklisp/software/cl-smtp-20101107-http/cl-smtp.lisp 2013-01-03 18:04:35.008250000 +0900
+++ /home/manabu/work/cl-smtp.lisp 2013-01-03 19:19:55.180125000 +0900
@@ -344,16 +344,14 @@
(setf stream
#+allegro (socket:make-ssl-client-stream stream)
#-allegro
- (let ((s (flexi-streams:flexi-stream-stream stream)))
- (cl+ssl:make-ssl-client-stream
- (cl+ssl:stream-fd s)
- :close-callback (lambda () (close s)))))
- #-allegro
- (setf stream (flexi-streams:make-flexi-stream
- stream
- :external-format
- (flexi-streams:make-external-format
- :latin-1 :eol-style :lf)))))
+ (let* ((s (flexi-streams:flexi-stream-stream stream))
+ (ef (flexi-streams:flexi-stream-external-format stream))
+ (efn (flexi-streams:external-format-name ef))
+ (s (cl+ssl:make-ssl-client-stream
+ (cl+ssl:stream-fd s)
+ :external-format efn
+ :close-callback (lambda () (close s)))))
+ (flexi-streams:make-flexi-stream s :external-format ef)))))
(ecase ssl
((or t :starttls)
(read-greetings)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment