A library for writing CGI programs
|Version on this page:||3001.4.0.0@rev:2|
|LTS Haskell 19.33:||3001.5.0.0|
|Stackage Nightly 2023-06-10:||3001.5.0.1|
|Latest on Hackage:||3001.5.0.1|
Maintained by John Chee, Peter Simons
This version can be pinned in stack with:
Module documentation for 3001.4.0.0
Depends on 10 packages(full list with versions):
base, bytestring, containers, exceptions, mtl, multipart, network-uri, parsec, time, xhtml
Used by 1 package in lts-14.27(full list with versions):
This is a Haskell library for writing CGI programs. Its features include:
- Access to CGI parameters (e.g. form input) from both GET and POST requests.
- Access to CGI environment variables.
- Ability to set arbitrary response headers.
- Support for HTTP cookies.
- An efficient implementation of multipart/form-data using Data.ByteString. This allows for efficient handling of file uploads.
- Wrapper functions for compatibility with the old Network.CGI module.
- A CGI monad transformer.
- Basic exception handling and logging (these should be improved)
- Low-level run functions that allow using programs written with this package with protocols other than CGI, for example FastCGI.
On hackage: http://hackage.haskell.org/package/cgi Source: https://github.com/cheecheeo/haskell-cgi
All notable changes to this project will be documented in this file. This project adheres to the Package Versioning Policy.
- Drop obsolete Network.CGI.Compat module. The code in that module relied on
obsolete functions and types from
networkwhich have been dropped there in the latest 3.x release. Re-writing the Compat module to use the new types felt like it would defeat the purpose of the module, so we’ve dropped it instead.
- Dropped the dependency on
networkaltogether. We need
network-uri, really. Giving up support for ancient versions of
networkallows us to drop the
network-uriflag, too, simplifying our builds.
- Dropped support for versions of
mtlprior to 2.2.x. That version was released almost 5 years ago, so we can probably drop the compatibility code (and the
old-mtlCabal flag) without surprising anyone.
- Added new
cookieHttpOnlyflag to the
Cookiestype. When set, the client’s browser will prevent client side scripts from accessing the cookie.
- Our error handling functions
handleExceptionCGIare deprecated. These functions are trivial aliases for the corresponding functions from the
MonadCatchclass. Users should directly use those functions. They are more general and have better documentation.
- Relax version constraints to allow building with network 2.8.x.
- Bumped upper version bounds for containers and time.
- Updated to exceptions 0.10.x. This meant extending our
MonadMaskinstance to provide the
generalBracketmethod that was added to the class in recent versions of the exceptions library.
- The doctest suite would not work reliably with different versions of Cabal. Instead of going all out with a custom written build system to support it properly, we now run doctests as part of our CI builds but not as a part of the Cabal build any more.
- Fixed several compiler warnings in our code.
- Bumped QuickCheck upper bound to version < 2.10
- Bumped doctest to version < 0.12
- Cookie.hs: cookieExpires now has type
Maybe UTCTimerather than
- Protocol.hs: URL decoding functions no longer decode UTF-8 encoding
- Functor and Applicative instance of CGIT no longer constrain Functor or Applicative parameter to be an instance of Monad
- CGI.hs haddock: Use web.archive.org link for CGI specification
- Added support for building with mtl < 2.2.1 via flags
- Bumped exceptions version to < 0.9
- MonadMask instance for CGIT
- Applicative instance for CGI Monad
- Deduplicate shared with
- GHC 7.8.3 support