Added support for either transfer or content encoding headers.