From 00d27d0e9cb05c6391091fdda4f69723519f6c9d Mon Sep 17 00:00:00 2001 From: Olivier Goffart Date: Mon, 13 May 2013 17:50:39 +0200 Subject: [PATCH] Fix HTTPBF again it really needs to be %u because if it is signed, then we have -- in the URL which the server can't understand --- src/httpbf/src/httpbf.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/httpbf/src/httpbf.c b/src/httpbf/src/httpbf.c index e9efb9d68..a2127f89f 100644 --- a/src/httpbf/src/httpbf.c +++ b/src/httpbf/src/httpbf.c @@ -231,7 +231,8 @@ static char* get_transfer_url( hbf_transfer_t *transfer, int indx ) { return NULL; } - if( sprintf(res, "%s-chunking-%d-%d-%d", transfer->url, transfer->transfer_id, + /* Note: must be %u for unsigned because one does not want '--' */ + if( sprintf(res, "%s-chunking-%u-%u-%u", transfer->url, transfer->transfer_id, transfer->block_cnt, indx ) < 0 ) { return NULL; }