moved response header processing into the response prototype so it can be overridden outside the lib