[Haskell-cafe] Network.CGI.Compat.pwrapper

Gracjan Polak gracjanpolak at gmail.com
Mon Feb 12 08:22:47 EST 2007


I wanted to setup really simple http server, found Network.CGI.Compat.pwrapper
and decided it suits my needs. Code:

module Main where
import Network.CGI
import Text.XHtml
import Network

doit vars = do
    return (body (toHtml (show vars)))

main = withSocketsDo (pwrapper (PortNumber 7777) doit)

Pointng any browser to does not render the page. It seems
the response headers are broken.

How do I report this bug (trac? something else?).

We might want to either fix it, or just get rid of it, as nobody seems to notice
the problem :)

$ ghc --version
The Glorious Glasgow Haskell Compilation System, version 6.6

Tested under WinXP and MacOSX 10.4.9.

Another question is: how do I do equivalent functionality without pwrapper?


More information about the Haskell-Cafe mailing list