[Bese-devel] Backend refactor (httpd, araneida): Unicode and binary uploads.

Maciek Pasternacki maciekp at japhy.fnord.org
Wed Dec 7 15:38:18 UTC 2005


I just pushed into ucw_public four patches that factor out some
functionality (Unicode-related functions and, later, body and url
query parsing) to src/backend/shared.lisp to be used by multiple
backends.  For Unicode-enabled sbcl file uploads (binary ones too) and
Unicode content do work now (at least for me).  Porting this
functionality to other Unicode-enabled Lisp implementations should be
easy.  Please review the diffs and test if it works and doesn't break
anything (especially on other Lisps).

As seen in file upload example, uploaded files are received as strings
if Content-Type is text/* and it can be decoded as application's
default charset; undecodable text files and other file types are
returned as byte arrays.  Parameters (query, POST) are treated like
text files -- if they can't be decoded, they are passed as byte arrays.

I changed only httpd and araneida backends (araneida tested with
current alan-araneida-testing, but it should work with other versions
since it uses now only unparsed body and url query strings); I will
work also on mod_lisp, when I manage to get the Apache side up.

If anybody has some comments on how uploads should work (especially
large file uploads -- I will also work on not keeping uploaded files
in memory since our app will need to work on large files), please send
them in, as my opinion on the Right Thing is not necessarily the
correct one.

-- 
__    Maciek Pasternacki <maciekp at japhy.fnord.org> [ http://japhy.fnord.org/ ]
`| _   |_\  / { ...For I was born with a habit, from a sign,
,|{-}|}| }\/       the habit of a windswept thumb,
\/   |____/        and a sign of the rain... }                  ( Fish )  -><-




More information about the bese-devel mailing list