Revision 1d2af25c snf-pithos-app/pithos/api/public.py

b/snf-pithos-app/pithos/api/public.py
157 157
            hashmaps.append(h)
158 158
        except:
159 159
            raise faults.ItemNotFound('Object does not exist')
160

  
161
    if 'Content-Disposition' not in meta:
162
        name = v_object.rstrip('/').split('/')[-1]
163
        if not name:
164
            name = v_public
165
        meta['Content-Disposition'] = 'attachment; filename=%s' % (name,)
166

  
167 160
    return object_data_response(request, sizes, hashmaps, meta, True)

Also available in: Unified diff