+ cache_file_end_t *info = _info;
+ if (!SOUP_STATUS_IS_SUCCESSFUL(message->status_code))
+ return;
+
+ fwrite(chunk->data, chunk->length, 1, info->fp);
+ goffset cur = ftell(info->fp);
+ //goffset total = soup_message_headers_get_range(message->response_headers);
+ goffset start=0, end=0, total=0;
+ soup_message_headers_get_content_range(message->response_headers,
+ &start, &end, &total);
+
+ if (info->user_chunk_cb)
+ info->user_chunk_cb(info->local, cur, total, info->user_data);
+}
+
+static SoupSession *do_cache(cache_file_end_t *info, gboolean truncate, gchar *reason)
+{
+ char *name = g_path_get_basename(info->uri);