Session support

Sessions, at the moment, are serialised, encrypted, signed and stored in cookies on the user's browser. In MiniHTTP they are availible as a Map with bytestrings as the keys and values.

Here's the current value of your session:

{{SESSION:h}}

You can set a value using the following form:

Templating

Templating is up to the user, nothing is built into MiniHTTP, however this code is using ctemplate, which is Google's internal templating system. It's pretty basic compared to other templating systems (which the reader may take to be a virtue or a deficiency), but it does escaping very well.

The wrapper still needs a little efficiency work, but is currently functional (as you can see). Due to ctemplate being a C++ library, you appear to need to compile anything which uses it; ghci will fail in glibc.

OpenID

My initial test of the code was to write an OpenID consumer. This involves both server and client HTTP code. It's currently fairly functional, though incomplete. I only have an account with MyOpenID.com, so I've not tested it with anything else.

For the moment, the input must be a valid URL. So don't forget the http:// at the beginning.

Once you have logged in, you should see your OpenID in the session output, above.

HTTPS support

Running an HTTPS server is as easy as running an HTTP server (as long as you have the certificate and private key in the correct format). However, it's been known to tickle a bug which causes the RTS to fall into an infinite loop.

HTTPS client support is comming.