'Connect to a backend node and send the headers.
Override superclass method to notify object of need for support for
multipart body with footers and optionally multiphase commit, and
verify object server\'s capabilities.
:param need_multiphase: if True then multiphase support is required of
the object server
:raises FooterNotSupported: if need_metadata_footer is set but
backend node can\'t process footers
:raises MultiphasePUTNotSupported: if need_multiphase is set but
backend node can\'t handle multiphase PUT'

@classmethod
def connect(cls, node, part, req, headers, conn_timeout, node_timeout, logger=None, need_multiphase=True, **kwargs):

    mime_boundary = ('%.64x' % random.randint(0, (16 ** 64)))
    headers = HeaderKeyDict(headers)
    headers.setdefault('X-Backend-Obj-Content-Length', headers.pop('Content-Length', None))
    headers['Transfer-Encoding'] = 'chunked'
    headers['Expect'] = '100-continue'
    headers['X-Backend-Obj-Multipart-Mime-Boundary'] = mime_boundary
    headers['X-Backend-Obj-Metadata-Footer'] = 'yes'
    if need_multiphase:
        headers['X-Backend-Obj-Multiphase-Commit'] = 'yes'
    (conn, expect_resp, final_resp, connect_duration) = cls._make_connection(node, part, req, headers, conn_timeout, node_timeout)
    if is_informational(expect_resp.status):
        continue_headers = HeaderKeyDict(expect_resp.getheaders())
        can_send_metadata_footer = config_true_value(continue_headers.get('X-Obj-Metadata-Footer', 'no'))
        can_handle_multiphase_put = config_true_value(continue_headers.get('X-Obj-Multiphase-Commit', 'no'))
        if (not can_send_metadata_footer):
            raise FooterNotSupported()
        if (need_multiphase and (not can_handle_multiphase_put)):
            raise MultiphasePUTNotSupported()
    return cls(conn, node, final_resp, req, connect_duration, logger, mime_boundary, multiphase=need_multiphase)
