From d0e0a12cb08cfbe87de087c3814e613fffcbf091 Mon Sep 17 00:00:00 2001
From: Daniel Ehrenberg <ehrenbed@carleton.edu>
Date: Tue, 26 Feb 2008 01:30:05 -0600
Subject: [PATCH] fixing SMTP for encodings (is ASCII appropriate?)

---
 extra/smtp/server/server.factor | 9 ++++-----
 1 file changed, 4 insertions(+), 5 deletions(-)

diff --git a/extra/smtp/server/server.factor b/extra/smtp/server/server.factor
index c28ec7745a..92b605e91c 100755
--- a/extra/smtp/server/server.factor
+++ b/extra/smtp/server/server.factor
@@ -1,5 +1,8 @@
 ! Copyright (C) 2007 Elie CHAFTARI
 ! See http://factorcode.org/license.txt for BSD license.
+USING: combinators kernel prettyprint io io.timeouts io.server
+sequences namespaces io.sockets continuations calendar io.encodings.ascii ;
+IN: smtp.server
 
 ! Mock SMTP server for testing purposes.
 
@@ -27,10 +30,6 @@
 ! bye
 ! Connection closed by foreign host.
 
-USING: combinators kernel prettyprint io io.timeouts io.server
-sequences namespaces io.sockets continuations calendar ;
-IN: smtp.server
-
 SYMBOL: data-mode
 
 : process ( -- )
@@ -64,7 +63,7 @@ SYMBOL: data-mode
 
 : smtp-server ( port -- )
     "Starting SMTP server on port " write dup . flush
-    "127.0.0.1" swap <inet4> <server> [
+    "127.0.0.1" swap <inet4> ascii <server> [
         accept [
             1 minutes stdio get set-timeout
             "220 hello\r\n" write flush