[Haskell-cafe] Re: file upload with Network.CGI
Peter Simons
simons at cryp.to
Fri Aug 27 06:34:51 EDT 2004
Glynn Clements writes:
> About the only functions in Network.CGI which might be
> useful for processing file uploads are getQueryString and
> getCgiVars, neither of which are exported.
Fortunately, another reader of this list has written the
necessary parsers already and sent me a copy of the code via
e-mail; so the file-upload problem is solved for now. I've
essentially replaced Network.CGI with his code in my
application altogether.
> This seems to be a common problem with Haskell libraries,
> i.e. define lots of useful low-level functions, use them
> to create a high-level interface (which typically isn't
> as useful as the author assumes), then only export the
> high-level interface.
Yes, the Network.CGI library is particularly weird in that
regard. The 'wrapper' API comes with several rather severe
limitations: the hard-coded list of supported 'cgiVarNames',
for example. I've also wondered why 'abort' isn't exported,
and so on ...
Peter
More information about the Haskell-Cafe
mailing list