fix content-encoding handling