Fix header/body separation
parent
ce076166fe
commit
5adf72b81d
|
@ -29,6 +29,7 @@
|
||||||
|
|
||||||
USING: combinators kernel prettyprint io io.timeouts io.server
|
USING: combinators kernel prettyprint io io.timeouts io.server
|
||||||
sequences namespaces io.sockets continuations ;
|
sequences namespaces io.sockets continuations ;
|
||||||
|
IN: smtp.server
|
||||||
|
|
||||||
SYMBOL: data-mode
|
SYMBOL: data-mode
|
||||||
|
|
||||||
|
@ -55,7 +56,7 @@ SYMBOL: data-mode
|
||||||
data-mode off
|
data-mode off
|
||||||
"220 OK\r\n" write flush t
|
"220 OK\r\n" write flush t
|
||||||
] }
|
] }
|
||||||
{ [ data-mode get ] [ t ] }
|
{ [ data-mode get ] [ global [ print ] bind t ] }
|
||||||
{ [ t ] [
|
{ [ t ] [
|
||||||
"500 ERROR\r\n" write flush t
|
"500 ERROR\r\n" write flush t
|
||||||
] }
|
] }
|
||||||
|
@ -68,5 +69,6 @@ SYMBOL: data-mode
|
||||||
60000 stdio get set-timeout
|
60000 stdio get set-timeout
|
||||||
"220 hello\r\n" write flush
|
"220 hello\r\n" write flush
|
||||||
process
|
process
|
||||||
|
global [ flush ] bind
|
||||||
] with-stream
|
] with-stream
|
||||||
] with-disposal ;
|
] with-disposal ;
|
||||||
|
|
|
@ -139,7 +139,7 @@ LOG: smtp-response DEBUG
|
||||||
: prepare-message ( body headers -- body' )
|
: prepare-message ( body headers -- body' )
|
||||||
[
|
[
|
||||||
prepare-headers
|
prepare-headers
|
||||||
" " ,
|
"" ,
|
||||||
dup string? [ string-lines ] when %
|
dup string? [ string-lines ] when %
|
||||||
] { } make ;
|
] { } make ;
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue