1. python_mirrors
  2. tracker/rietveld

Commits

Roger Tawa  committed 0a75a06 Draft

Fix break in image download introduced by revision 9ab36a14429b

  • Participants
  • Parent commits fffdfa5
  • Branches default

Comments (0)

Files changed (1)

File codereview/views.py

View file
  • Ignore whitespace
   """/<issue>/content/<patchset>/<patch>/<content> - Return patch's content."""
   response = HttpResponse(request.content.data, content_type=request.mime_type)
   filename = re.sub(
-      r'[^\w\.]', '_', response.patch.filename.encode('ascii', 'replace'))
+      r'[^\w\.]', '_', request.patch.filename.encode('ascii', 'replace'))
   response['Content-Disposition'] = 'attachment; filename="%s"' % filename
   response['Cache-Control'] = 'no-cache, no-store'
   return response