[plt-scheme] Questions about Web Server usage

From: YC (yinso.chen at gmail.com)
Date: Tue May 29 19:34:18 EDT 2007

On 5/29/07, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> Another question, currently the web-server provides bindings as an
> alist of symbols and strings. This causes problem when non-UTF8 data
> is sent to the web-server, because it cannot be turned into MzScheme's
> strings. Another problem is that it complicates file-content
> (currently the filename is thrown away by the server.) How to people
> feel about switching to a list of bindings. Where a binding is either
> (Binding:Form key:bytes? value:bytes?) or (Binding:File key:bytes?
> filename:bytes? content:bytes?). This will avoid both problems.

Hi Jay -

Do you mean that both the key & the value would be replaced with bytes
instead of strings?

IMHO for files it makes sense to use bytes as the value because often we
just want the file raw rather than processing it.  But for form bindings it
seems string is more useful as it's easier to convert to other types, so to
me this doesn't seem to be a better solution.

Also - if non utf-8 bytes are difficult to translate to utf-8 at web server
level then it's probably also not trivial to do so at servlet level.  Are
there good mechanisms to handle code page translations in mzscheme?

My 2 cents ;)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.racket-lang.org/users/archive/attachments/20070529/88c4f8e2/attachment.html>

Posted on the users mailing list.