summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYehuda Sadeh <yehuda@inktank.com>2012-08-18 02:34:23 +0200
committerSage Weil <sage@inktank.com>2012-08-21 00:37:18 +0200
commitcc435e99802f77b3d4b21abe022665ac9df259cf (patch)
tree43c1f186e7b476a7ee1de7aadc48c050be5821af
parentosd: fix requeue order of dup ops (diff)
downloadceph-cc435e99802f77b3d4b21abe022665ac9df259cf.tar.xz
ceph-cc435e99802f77b3d4b21abe022665ac9df259cf.zip
rgw: dump content_range using 64 bit formatters
Fixes: #2961 Also make sure that size is 64 bit. backport: argonaut Signed-off-by: Yehuda Sadeh <yehuda@inktank.com> Reviewed-by: Sage Weil <sage@inktank.com>
-rw-r--r--src/rgw/rgw_rest.cc4
-rw-r--r--src/rgw/rgw_rest.h2
2 files changed, 3 insertions, 3 deletions
diff --git a/src/rgw/rgw_rest.cc b/src/rgw/rgw_rest.cc
index 2e5e78fefba..c2990e3fdb7 100644
--- a/src/rgw/rgw_rest.cc
+++ b/src/rgw/rgw_rest.cc
@@ -253,9 +253,9 @@ void dump_continue(struct req_state *s)
FCGX_FFlush(s->fcgx->out);
}
-void dump_range(struct req_state *s, off_t ofs, off_t end, size_t total)
+void dump_range(struct req_state *s, uint64_t ofs, uint64_t end, uint64_t total)
{
- CGI_PRINTF(s,"Content-Range: bytes %d-%d/%d\n", (int)ofs, (int)end, (int)total);
+ CGI_PRINTF(s,"Content-Range: bytes %lld-%lld/%lld\n", (long long)ofs, (long long)end, (long long)total);
}
int RGWGetObj_REST::get_params()
diff --git a/src/rgw/rgw_rest.h b/src/rgw/rgw_rest.h
index b0ba54965fa..ae8cf4eab0a 100644
--- a/src/rgw/rgw_rest.h
+++ b/src/rgw/rgw_rest.h
@@ -189,7 +189,7 @@ extern void dump_content_length(struct req_state *s, size_t len);
extern void dump_etag(struct req_state *s, const char *etag);
extern void dump_last_modified(struct req_state *s, time_t t);
extern void abort_early(struct req_state *s, int err);
-extern void dump_range(struct req_state *s, off_t ofs, off_t end, size_t total_size);
+extern void dump_range(struct req_state *s, uint64_t ofs, uint64_t end, uint64_t total_size);
extern void dump_continue(struct req_state *s);
extern void list_all_buckets_end(struct req_state *s);
extern void dump_time(struct req_state *s, const char *name, time_t *t);