cast content length header to int for comparison with size limit