Make WriteHeader set status before calling beforeFuncs so middlewares can do stuff based on the resulting status code of the request