pass status code along with gzip html error

Improved the fix for issue #44 in order to pass appropriate status code in the response headers