adding support for setting headers in server responses - fixes #4