[tbnl-devel] Upload of text files

Hi, I have noticed a minor problem when uploading text files with TBNL (version 0.5.5 + Apache 2.0.54 + mod_lisp2 + LispWorks 4.4.5, all on Windows 2000) -- DOS/Windows text files (CR/LF) have one empty line appended at the end when uploaded. Unix text files, however, are transferred correctly. Any ideas? Jaroslaw Tomczak P.S. Edi, thanks for your great libraries! -- Dr. Jaroslaw Tomczak Aventis Pharma Deutschland GmbH A company of the sanofi-aventis group SMA Chemical Sciences Drug Design I Industriepark Hoechst, H840 room 104 D-65926 Frankfurt / Main phone: +49 (69) 305-14710 fax: +49 (69) 305-13068

Hi! On Mon, 4 Jul 2005 13:24:54 +0200, <Jaroslaw.Tomczak@sanofi-aventis.com> wrote:
I have noticed a minor problem when uploading text files with TBNL (version 0.5.5 + Apache 2.0.54 + mod_lisp2 + LispWorks 4.4.5, all on Windows 2000) -- DOS/Windows text files (CR/LF) have one empty line appended at the end when uploaded. Unix text files, however, are transferred correctly.
Thanks for the report, I wasn't aware of this.
Any ideas?
I sniffed around a bit and it looks like the problem is in the RFC 2388 library TBNL uses. As a workaround try to replace the part of rfc2388.lisp which looks like (3 ;; first dash in dash-boundary (cond ((char= char #\-) (enqueue-char) (setq state 4)) (t (write-queued-chars) (write-char char result) (setq state 1)))) with this one: (3 ;; first dash in dash-boundary (cond ((char= char #\-) (enqueue-char) (setq state 4)) ((char= char #\return) (write-queued-chars) (enqueue-char) (setq state 2)) (t (write-queued-chars) (write-char char result) (setq state 1)))) I haven't really tested if this breaks anything else but at least it seems to get rid of your problem. Let me know if it works for you. I'll send a bug report to Janis.
P.S. Edi, thanks for your great libraries!
You're welcome. Cheers, Edi.

On Tue, 05 Jul 2005 13:07:45 +0200, Edi Weitz <edi@agharta.de> wrote:
I sniffed around a bit and it looks like the problem is in the RFC 2388 library TBNL uses. As a workaround [...]
FWIW, Janis Dzerins has just released a new version of his RFC 2388 library which fixes this so you can now use the "official" version again. Cheers, Edi.
participants (2)
-
Edi Weitz
-
Jaroslaw.Tomczak@sanofi-aventis.com