add ContentLength middleware