Tasks to perform:

Consider adding a routine to set cookies and possibly other common
headers. Perhaps put such optional extras into a separate module.
Decide whether to tighten validation of cookie names.
Decide on the appropriate action to take when presented with multiple
cookies with the same name and document it.
