[PATCH] Allow to download public bundle as mbox

David Miller davem at davemloft.net
Wed Nov 7 04:46:46 EST 2012


From: Jeremy Kerr <jk at ozlabs.org>
Date: Tue, 06 Nov 2012 16:45:07 +0800

> Hi Simo,
> 
>> Downloading single patches anonimously is allowed, we may as well
>> allow
>> downloading public bundles as mboxes.
> 
> Looks good. This does raise one question for everyone though:
> 
>>
>> +def mbox_response(bundle, name):
>>       response = HttpResponse(mimetype='text/plain')
>> -    response['Content-Disposition'] = 'attachment;
>> -    filename=bundle-%d.mbox' % \
>> -        bundle.id
>> + response['Content-Disposition'] = 'attachment;
>> filename=bundle-%s.mbox' % \
>> +        name
>>       response.write(bundle.mbox())
>>       return response
> 
> Does anyone mind if we change the Content-Disposition HTTP header for
> downloading private bundles from the form:
> 
>    bundle-<ID>.mbox
> 
> to:
> 
>    bundle-<NAME>.mbox
> 
> ?
> 
> In other words, does anyone rely on the bundle name to contain the ID?

I use throwaway bundles having the same name over and over again (like
"net" and "net-next") and I sometimes leave old bundle files around by
accident, so using the name could definitely cause problems for me as
the new ID generated each time lets me know that it's a new bundle
rather than a dup.


More information about the Patchwork mailing list