guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Uploading Word documents, PDFs, PNG files etc


From: Sebastian Tennant
Subject: Re: Uploading Word documents, PDFs, PNG files etc
Date: Thu, 21 May 2009 05:22:15 +0000
User-agent: Gnus/5.110011 (No Gnus v0.11) Emacs/22.2 (gnu/linux)

Quoth address@hidden (Ludovic Courtès):
> Hello,
>
> Sebastian Tennant <address@hidden> writes:
>
>> Content-Disposition is mandatory, but Content-Type is optional
>> (defaulting to text/plain) as is Content-Transfer-Encoding, so the
>> "header part" of any given MIME part may be a single line or it may be
>> three.
>
> Then I presume this could be read line-by-line as strings (using
> `read-line' from `(ice-9 rdelim)') until the end-of-header marker is
> reached.  The remaining data would be read using `uniform-vector-read!'
> or some such.

Problem solved.  With this patch applied to cgi.scm in ttn's (www cgi)
module, uploading of binary data now works with Guile 1.8.

In the end it was simply a case of splitting each part into a header
section and value section using string-contains and substring rather
than match:prefix and match:suffix.

Thanks for all your help.

Seb
-- 
Emacs' AlsaPlayer - Music Without Jolts
Lightweight, full-featured and mindful of your idyllic happiness.
http://home.gna.org/eap

Attachment: cgi.diff
Description: Unified diff


reply via email to

[Prev in Thread] Current Thread [Next in Thread]