SSL and delivery
[LWW 4.4.5, WinXP pro SP2, OpenSSL 0.9.8 from the source described in
the LispWorks User Guide.]
Consider the following simple delivery script (function FOO is
basically the example from the reference entry for OPEN-TCP-STREAM):
(require "comm")
(defun foo (hostname)
(with-open-stream (http (comm:open-tcp-stream hostname 443 :ssl-ctx t))
(format http "GET / HTTP/1.0~C~C~C~C"
(code-char 13) (code-char 10)
(code-char 13) (code-char 10))
(force-output http)
(format t "Waiting for reply")
(loop for ch = (read-char-no-hang http nil :eof)
until ch
do (write-char #\.)
(force-output)
(sleep 0.25)
finally (unless (eq ch :eof)
(unread-char ch http)))
(format t "~%~%")
(loop for line = (read-line http nil nil)
while line
do (write-line line))))
(compile 'foo)
(defun main ()
(format t "Connecting...~%")
(foo "daybyday.de")
(format t "Done. Waiting for 5 seconds.~%")
(sleep 5)
(quit))
(compile 'main)
(deliver 'main "Foo" 0
:interface :capi
:console t)
If I deliver an application Foo.exe with this script a console window
pops up, I see "Connecting", then the response from the website (a 302
redirect), then "Done", and finally it quits after five seconds - as
expected.
If I, however, deliver without the :INTERFACE :CAPI keyword argument I
only see "Connecting" at which point the application hangs and CPU
usage goes up to almost 100%.
Is this expected behaviour or a bug?
Thanks,
Edi.