fix content-length not always being set by master