put up some optimization for when content-length is 0
forgot to add this when migrated to using cowboy