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