canvas-lms/app
Jacob Fugal 3b2d4b38af include response-content-disposition in S3 download urls
when downloading a file (attachment) that's on S3, include the
response-content-disposition parameter in the redirect url so that the user
will get a Content-Disposition header from S3 giving the file the correct
disposition (attachment, not in-browser) and the correct filename (the
'natural' filename in S3 is that of the first copy of the file uploaded;
someone else may have uploaded it again with a different filename; we want them
to see the correct filename in the download).

CAVEATS:

 * in the case of duplicate files with different filenames, the content
   disposition will cause the correct filename to be used by the browser in
   saving/prompting-to-save the file, but the actual S3 filename will still be
   present in the URL if inspected.

 * the filename in the content-disposition is correctly quoted as per RFC 2616
   for ASCII, but a lot of browsers do it wrong. we are making no attempt to
   accomodate their idiosyncracies.

 * the http quoting we do is ghetto and doesn't account for multi-byte
   characters.

fixes #4473

Change-Id: I468a6ecdaee2946ab89172984adacf20b491d541
Reviewed-on: https://gerrit.instructure.com/6506
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-10-26 16:00:31 -06:00
..
coffeescripts added favorite courses option to main menu 2011-10-24 15:50:34 -06:00
controllers fix some invitation acceptance bugs refs #5833 2011-10-26 15:47:25 -06:00
helpers added favorite courses option to main menu 2011-10-24 15:50:34 -06:00
messages refactor user creation/invitations closes #5833 2011-10-24 12:07:08 -06:00
middleware sis import api 2011-04-08 15:45:57 -06:00
models include response-content-disposition in S3 download urls 2011-10-26 16:00:31 -06:00
stylesheets fix collaborator (de)select all links. refs #5796 2011-10-26 15:24:18 -06:00
views fix some invitation acceptance bugs refs #5833 2011-10-26 15:47:25 -06:00