Fixed middleware failure on HTTP 304 - Not Modified responses

The http server sending an HTTP 304 not modified response will break the middleware and cause it to hang up as wrapped res.end never gets called.