Added specific encoding for calculating content length