Adding content-length check
Merge pull request #8 from mapbox/length-check

Adding content-length check