http: throw error when attempting to write to response with no body
Previously, when the _hasBody property of the response object was false, the code simply ignored any data being written to the response. This behavior was changed to throw an error instead, which is more appropriate for responses that are not allowed to have a body