'Send the current batch on its way.
If successful, resets self.batch and self.batch_size.
Raises:
HTTPError with code=404 if the server doesn\'t support batching.'

def SendBatch(self):

    boundary = 'boundary'
    parts = []
    for (path, payload, mime_type) in self.batch:
        while (boundary in payload):
            boundary += ('%04x' % random.randint(0, 65535))
            assert (len(boundary) < 80), 'Unexpected    error,    please    try    again.'
        part = '\n'.join(['', ('X-Appcfg-File:    %s' % urllib.quote(path)), ('X-Appcfg-Hash:    %s' % _Hash(payload)), ('Content-Type:    %s' % mime_type), ('Content-Length:    %d' % len(payload)), 'Content-Transfer-Encoding:    8bit', '', payload])
        parts.append(part)
    parts.insert(0, ('MIME-Version:    1.0\nContent-Type:    multipart/mixed;    boundary="%s"\n\nThis    is    a    message    with    multiple    parts    in    MIME    format.' % boundary))
    parts.append('--\n')
    delimiter = ('\n--%s' % boundary)
    payload = delimiter.join(parts)
    logging.info('Uploading    batch    of    %d    %ss    to    %s    with    boundary="%s".', len(self.batch), self.what, self.batch_url, boundary)
    self.logging_context.Send(self.batch_url, payload=payload, content_type='message/rfc822')
    self.batch = []
    self.batch_size = 0
