chicken-users
[Top][All Lists]
Advanced

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

Re: [Chicken-users] wishlist: http egg


From: Daishi Kato
Subject: Re: [Chicken-users] wishlist: http egg
Date: Tue, 26 Dec 2006 17:42:48 +0900

Hi,

The reason that I thought the multipart is not supported
is simply my mistake in a sample html.

The http-server-form-posts works perfectly for my need,
except for the following:

a) I want to parse body by itself, and no procedure is exported for
it. My workaround is:
                     (request->form-field-list
                      (http:make-request 'dummy 'dummy 'dummy body))

b) form-field-list->form-field-alist does not provide a pure alist, my
workaround is:
(define (form-field-list->form-field-alist form-field-list)
 (fold (lambda (field acc)
         (cons (cons (form-field:name field)
                     `((content-type . ,(form-field:content-type field))
                       (file-name . ,(form-field:file-name field))
                       (body . ,(if (string? (form-field:body field))
                                    (form-field:body field)
                                    (form-field-list->form-field-alist
                                     (form-field:body field))))))
               acc))
       '() form-field-list))


Also, I noticed that nested multiparts is not handled well,
although I'm not using nested multiparts.

Daishi

On 25 Dec 2006 14:15:28 -0200, Mario Domenech Goulart
<address@hidden> wrote:
Hello Daishi,

On Mon, 25 Dec 2006 17:27:54 +0900 "Daishi Kato" <address@hidden> wrote:

> - Support for multipart/* content-types.
>   (especially for multipart/form-data)
>
> I was trying to write a content-parser,
> which turned out to be not enough.

Doesn't http-server-form-posts [1] do what you want?

[1] 
http://www.call-with-current-continuation.org/eggs/http-server-form-posts.html

Best wishes,
Mario





reply via email to

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