~drizzle-trunk/drizzle/development

« back to all changes in this revision

Viewing changes to plugin/pbms/src/cslib/CSS3Protocol.cc

  • Committer: Monty Taylor
  • Date: 2011-03-11 18:48:55 UTC
  • mfrom: (2228.1.8 build)
  • Revision ID: mordred@inaugust.com-20110311184855-1essd3a6xfr7lx6r
Merged Andrew: drizzledump and docs bug fixes
Merged Barry: pbms bugfixes

Show diffs side-by-side

added added

removed removed

Lines of Context:
401
401
                curl_easy_getinfo(ms_curl, CURLINFO_FILETIME, &ms_last_modified);
402
402
                exit_();                
403
403
        }
404
 
        
405
404
        inline void ms_execute_put_request(CSInputStream *input, off64_t size)
406
405
        {
407
406
                enter_();
437
436
                        Md5Digest digest;
438
437
                        
439
438
                        ms_md5.md5_get_digest(&digest);
440
 
                        cs_bin_to_hex(HEX_CHECKSUM_VALUE_SIZE, checksum, CHECKSUM_VALUE_SIZE, digest.val);
441
 
                        checksum[HEX_CHECKSUM_VALUE_SIZE] = 0;
 
439
                        cs_bin_to_hex(HEX_CHECKSUM_VALUE_SIZE +1, checksum, CHECKSUM_VALUE_SIZE, digest.val);
442
440
                        
443
441
                        cs_strToUpper(ms_s3Checksum);
444
442
                        if (strcmp(checksum, ms_s3Checksum)) {
522
520
        s3_buffer->append(bucket);
523
521
        s3_buffer->append("/");
524
522
        s3_buffer->append(key);
525
 
        
 
523
 
526
524
#ifdef SHOW_SIGNING
527
525
printf("signing:\n=================\n%s\n=================\n",  s3_buffer->getCString());
 
526
printf("Public Key:\"%s\"\n",   s3_public_key->getCString());
 
527
printf("Private Key:\"%s\"\n",  s3_private_key->getCString());
528
528
if(0){
529
529
        const char *ptr = s3_buffer->getCString();
530
530
        while (*ptr) {
623
623
//----------------------
624
624
static bool try_addHeader(CSThread *self, S3ProtocolCon *con, char *name, uint32_t name_len, char *value, uint32_t value_len)
625
625
{
 
626
        volatile bool rtc = true;
 
627
        
626
628
        try_(a) {
627
629
                con->ms_reply_headers.addHeader(name, name_len, value, value_len);
628
 
                return false;
 
630
                rtc = false;
629
631
        }
630
632
        
631
633
        catch_(a);
632
634
        cont_(a);
633
 
        return true;
 
635
        return rtc;
634
636
}
635
637
 
636
638
//----------------------
1358
1360
                prot->s3_setServer(server);
1359
1361
                prot->s3_setPublicKey(pub_key);
1360
1362
                prot->s3_setPrivateKey(priv_key);
 
1363
                prot->s3_setMaxRetries(0);
1361
1364
                
1362
1365
                switch (argv[1][0]) {
1363
1366
                        case 'q': // Get the query string