]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commitdiff
rgw: fix content length encoding
authorYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 10 Aug 2010 20:37:58 +0000 (13:37 -0700)
committerYehuda Sadeh <yehuda@hq.newdream.net>
Tue, 10 Aug 2010 22:02:10 +0000 (15:02 -0700)
src/rgw/rgw_rest.cc

index a3440a53182d4a70bf7485a87d97ddefae1f8640..441a1182542b546995a102d46bf15dc0b0407724 100644 (file)
@@ -81,9 +81,11 @@ void close_section(struct req_state *s, const char *name)
   CGI_PRINTF(s->fcgx->out, "</%s>", name);
 }
 
-static void dump_content_length(struct req_state *s, int len)
+static void dump_content_length(struct req_state *s, size_t len)
 {
-  CGI_PRINTF(s->fcgx->out, "Content-Length: %d\n", len);
+  char buf[16];
+  snprintf(buf, sizeof(buf), "%llu", len);
+  CGI_PRINTF(s->fcgx->out, "Content-Length: %s\n", buf);
   CGI_PRINTF(s->fcgx->out, "Accept-Ranges: %s\n", "bytes");
 }