'Process the response from a single chunk upload.
Args:
resp: httplib2.Response, the response object.
content: string, the content of the response.
Returns:
(status, body): (ResumableMediaStatus, object)
The body will be None until the resumable media is fully uploaded.
Raises:
googleapiclient.errors.HttpError if the response was not a 2xx or a 308.'

def _process_response(self, resp, content):

    if (resp.status in [200, 201]):
        self._in_error_state = False
        return (None, self.postproc(resp, content))
    elif (resp.status == 308):
        self._in_error_state = False
        try:
            self.resumable_progress = (int(resp['range'].split('-')[1]) + 1)
        except KeyError:
            self.resumable_progress = 0
        if ('location' in resp):
            self.resumable_uri = resp['location']
    else:
        self._in_error_state = True
        raise HttpError(resp, content, uri=self.uri)
    return (MediaUploadProgress(self.resumable_progress, self.resumable.size()), None)
