Write outgoing message header.
You should call xr_http_setup_*() and xr_http_set_message_length() functions before calling this.