projects
/
bluesky.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
fe8e013
)
Add byte range support to the Azure backend.
author
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 25 Feb 2011 00:40:06 +0000
(16:40 -0800)
committer
Michael Vrable
<mvrable@cs.ucsd.edu>
Fri, 25 Feb 2011 00:40:06 +0000
(16:40 -0800)
bluesky/store-azure.c
patch
|
blob
|
history
diff --git
a/bluesky/store-azure.c
b/bluesky/store-azure.c
index
e7a2b71
..
176d38b
100644
(file)
--- a/
bluesky/store-azure.c
+++ b/
bluesky/store-azure.c
@@
-268,6
+268,20
@@
static void azurestore_task(gpointer a, gpointer s)
BlueSkyRCStr *result = NULL;
if (async->op == STORE_OP_GET) {
BlueSkyRCStr *result = NULL;
if (async->op == STORE_OP_GET) {
+ /* FIXME: We ought to check that the response returned the requested
+ * byte range. */
+ if (async->start != 0 && async->len != 0) {
+ g_hash_table_insert(headers,
+ g_strdup("Range"),
+ g_strdup_printf("%zd-%zd", async->start,
+ async->start + async->len));
+ async->range_done = TRUE;
+ } else if (async->start != 0) {
+ g_hash_table_insert(headers,
+ g_strdup("Range"),
+ g_strdup_printf("%zd-", async->start));
+ async->range_done = TRUE;
+ }
result = submit_request(store, "GET", async->key, headers, NULL);
if (result != NULL) {
async->data = result;
result = submit_request(store, "GET", async->key, headers, NULL);
if (result != NULL) {
async->data = result;