calculate Content-length properly
version bump to v0.2.2 with Content-length fix