diff options
author | Bryan Ischo <bryan@ischo.com> | 2008-09-17 10:13:38 +0000 |
---|---|---|
committer | Bryan Ischo <bryan@ischo.com> | 2008-09-17 10:13:38 +0000 |
commit | 7b43fe0d3d2890d37b393148085e94c3fe6e8291 (patch) | |
tree | 67e9e9505387384982eef8d1fe2e143fb13ef6bc /src | |
parent | eddd387eec79e6fb3316f97f41ea7dd58898f588 (diff) | |
download | ceph-libs3-7b43fe0d3d2890d37b393148085e94c3fe6e8291.tar.gz |
* Fixed crypto and base64 to work properly on 64 bit systems
* Fixed a bug where Content-Type header was not being printed by S3 on get/head
* Fixed ranged get requests, which weren't working at all before due to some
cruft left over from a previous change
* Incorporated a better debian shared libs step into the debian package
build logic of the GNUmakefile, as supplied by Paul J Stevens
Diffstat (limited to 'src')
-rw-r--r-- | src/request.c | 2 | ||||
-rw-r--r-- | src/s3.c | 1 | ||||
-rw-r--r-- | src/util.c | 10 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/request.c b/src/request.c index 8b4df63..d5b455e 100644 --- a/src/request.c +++ b/src/request.c @@ -473,7 +473,7 @@ static S3Status compose_standard_headers(const RequestParams *params, S3StatusIfNotMatchETagTooLong); // Range header - if (params->getConditions && (params->startByte || params->byteCount)) { + if (params->startByte || params->byteCount) { if (params->byteCount) { snprintf(values->rangeHeader, sizeof(values->rangeHeader), "Range: bytes=%llu-%llu", @@ -685,6 +685,7 @@ static S3Status responsePropertiesCallback } \ } while (0) + print_nonnull("Content-Type", contentType); print_nonnull("Request-Id", requestId); print_nonnull("Request-Id-2", requestId2); if (properties->contentLength > 0) { @@ -281,7 +281,7 @@ int base64Encode(const unsigned char *in, int inLen, unsigned char *out) static void SHA1_transform(uint32_t state[5], const unsigned char buffer[64]) { - unsigned long a, b, c, d, e; + uint32_t a, b, c, d, e; typedef union { unsigned char c[64]; @@ -299,7 +299,7 @@ static void SHA1_transform(uint32_t state[5], const unsigned char buffer[64]) d = state[3]; e = state[4]; - static unsigned int endianness_indicator = 0x1; + static uint32_t endianness_indicator = 0x1; if (((unsigned char *) &endianness_indicator)[0]) { R0A_L( 0); R0E_L( 1); R0D_L( 2); R0C_L( 3); R0B_L( 4); R0A_L( 5); @@ -356,7 +356,7 @@ static void SHA1_init(SHA1Context *context) static void SHA1_update(SHA1Context *context, const unsigned char *data, unsigned int len) { - unsigned int i, j; + uint32_t i, j; j = (context->count[0] >> 3) & 63; @@ -384,7 +384,7 @@ static void SHA1_update(SHA1Context *context, const unsigned char *data, static void SHA1_final(unsigned char digest[20], SHA1Context *context) { - unsigned long i; + uint32_t i; unsigned char finalcount[8]; for (i = 0; i < 8; i++) { @@ -466,7 +466,7 @@ uint64_t hash(const unsigned char *k, int length) a = b = c = 0xdeadbeef + ((uint32_t) length); - static unsigned int endianness_indicator = 0x1; + static uint32_t endianness_indicator = 0x1; if (((unsigned char *) &endianness_indicator)[0]) { while (length > 12) { a += k[0]; |