Add Content-Length header.

Since we prepare the whole content in a buf before sending, we can as
well set the Content-Length explicitly.

Change-Id: Ifd91764c90af53be49f93f0b33032138130b6f96
Merge "Add Content-Length header."