[PATCH] Allow to download public bundle as mbox

simo idra at samba.org
Wed Nov 7 02:17:23 EST 2012


On Tue, 2012-11-06 at 16:45 +0800, Jeremy Kerr wrote:
> 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?

Note that I didn't really change it, for normal mboxes the name is
str(bundle.id) :-)

Simo.

-- 
Simo Sorce
Samba Team GPL Compliance Officer <simo at samba.org>
Principal Software Engineer at Red Hat, Inc. <simo at redhat.com>



More information about the Patchwork mailing list