PR #16 broke the middleware for users who call WriteHeader within their handlers before writing the response body.
This PR changes the tests to properly test http.ResponseWriter header and it also changes the logic from PR #16 to only allow empty responses if the status code is 204 or 304.
PR #16 broke the middleware for users who call
WriteHeader
within their handlers before writing the response body.This PR changes the tests to properly test
http.ResponseWriter
header and it also changes the logic from PR #16 to only allow empty responses if the status code is 204 or 304.