accept response data from a struct, as well as the usual cgi env vars.

new tests are missing