12 Dec 2007 12:34
CHUNGA:INPUT-CHUNKING-UNEXPECTED-END-OF-FILE
Nico de Jager <ndj <at> hivsa.com>
2007-12-12 11:34:14 GMT
2007-12-12 11:34:14 GMT
Hi
I have a fingerprint scanning application, that uploads fingerprint images using Drakma to a Hunchentoot
server. Everything works great as long as I don't use a secure connection. With https, I get a
CHUNGA:INPUT-CHUNKING-UNEXPECTED-END-OF-FILE condition on the server, and "Timeout while writing
8192 bytes to #<COMM:SOCKET-STREAM >" on the client. Sometimes the uploads are successful with https, though.
The server runs LispWorks 5.0.2 on Debian Etch. The client runs on LispWorks 5.0.2 on Windows XP SP2. Part of
the application pulls in the trivial-ldap module which depends on cl+ssl - not sure if this can be an issue
as cl+ssl is not needed on LispWorks for Drakma and Hunchentoot.
I am sure I am doing something stupid. The handler that does the actual upload on the client (which also uses
Hunchentoot) is:
(define-easy-handler (upload-fp-image.action :uri
"/hunchentoot/patient-study-db/upload-fp-image.action") ()
(let ((cookie-jar (make-instance 'drakma:cookie-jar
:cookies (list (make-instance 'drakma:cookie :name (session-value :hs-name) :value (session-value :hs-id)
:path (session-value :hs-path) :domain (session-value :hs-domain))))))
(handler-case
(let ((html-result (drakma:http-request (session-value :upload-url)
:method :post
:parameters (list (cons "finger" (session-value :finger))
(cons "img-file" (pathname *scanned-file*))
(cons "hs-id" (session-value :hs-id)))
:user-agent (session-value :user-agent)
:cookie-jar cookie-jar)))
(delete-file *scanned-file*)
(with-html-output-to-string (*standard-output*)
(str html-result)))
(condition (con)
(Continue reading)
RSS Feed