Return the right content in the response when it's compressed

Fix #1007