Probably better to use generic header setter rather than the content length setter which seems to suffer from type differences (long/int) in the signature across the hierarchy
Merge pull request #172 from noamt/master

An amendment to the content-length header patch