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>
This commit is contained in:
Yehuda Sadeh 2012-08-17 17:34:23 -07:00 committed by Sage Weil
parent dd4c1dc9f9
commit cc435e9980
2 changed files with 3 additions and 3 deletions

View File

@ -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()

View File

@ -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);