Two fixes

Don't send Content-Length header if not needed. (see #480)
Always use build_header... (see #473)