httpbf: Make sure to use unsigned number as the id

Else, we can have filename like  foo-chunking--1234-4-0 and the double
dash make the serverside regexp fail
This commit is contained in:
Olivier Goffart 2013-01-29 16:22:21 +01:00
parent e75f11b87a
commit 53b1edd1dc

View File

@ -188,7 +188,7 @@ char* get_transfer_url( hbf_transfer_t *transfer, int indx ) {
block = transfer->block_arr[indx];
if( ! block ) return NULL;
if( asprintf(&res, "%s-chunking-%d-%d-%d", transfer->url, transfer->transfer_id,
if( asprintf(&res, "%s-chunking-%u-%u-%u", transfer->url, transfer->transfer_id,
transfer->block_cnt, indx ) < 0 ) {
return NULL;
}