~ubuntu-branches/ubuntu/precise/boinc/precise

« back to all changes in this revision

Viewing changes to client/http_curl.cpp

  • Committer: Bazaar Package Importer
  • Author(s): Steffen Moeller
  • Date: 2011-10-09 15:50:33 UTC
  • mfrom: (49.1.6 sid)
  • Revision ID: james.westby@ubuntu.com-20111009155033-79ps2e1gl07gs8mg
* Fixing FTBFS (Closes: #644796).
* substituted install target with override_dh_auto_install

Show diffs side-by-side

added added

removed removed

Lines of Context:
323
323
// Initialize an HTTP POST operation,
324
324
// where the input is a memory string (r1) followed by an optional file (in)
325
325
// with optional offset,
326
 
// and the output goes to memory (also r1)
 
326
// and the output goes to memory (also r1, limited by r1_len)
327
327
// This is used for file upload (both get_file_size and file_upload)
328
328
//
329
329
int HTTP_OP::init_post2(
335
335
    init();
336
336
    req1 = r1;
337
337
    req1_len = r1_len;
 
338
    content_length = 0;
338
339
    if (in) {
339
340
        safe_strcpy(infile, in);
340
341
        file_offset = offset;
422
423
    // the following seems to be a no-op
423
424
    // curl_easy_setopt(curlEasy, CURLOPT_ERRORBUFFER, error_msg);
424
425
 
425
 
    curl_easy_setopt(curlEasy, CURLOPT_URL, m_url);
 
426
    char esc_url[1024];
 
427
    string_substitute(m_url, esc_url, sizeof(esc_url), " ", "%20");
 
428
    curl_easy_setopt(curlEasy, CURLOPT_URL, esc_url);
426
429
 
427
430
    // This option determines whether curl verifies that the server
428
431
    // claims to be who you want it to be.
738
741
        }
739
742
        iter++;
740
743
    }
741
 
    msg_printf(NULL, MSG_INTERNAL_ERROR, "HTTP operation not found");
742
744
    return ERR_NOT_FOUND;
743
745
}
744
746