[tbnl-devel] Upload of text files

Edi Weitz edi at agharta.de
Tue Jul 5 11:07:45 UTC 2005


Hi!

On Mon, 4 Jul 2005 13:24:54 +0200, <Jaroslaw.Tomczak at 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.



More information about the Tbnl-devel mailing list