Php content encoding gzip

I know this is not perfect, but we catch the header encoding and error above 400 and 500