fix response encoding support (#276)