Skip to content

Commit aa28c73

Browse files
author
Landon Wilkins
committed
add application/gzip mime type
on ubuntu 14.04, the tarred file referenced in spec/models/content_migration_spec.rb:370 returns "application/gzip" as its mime type which is not in the current list of mime types. fixes SD-1229 test plan: * specs pass Change-Id: I0575393e60da83ba7089a0acede18eaf4a6c1db8 Reviewed-on: https://gerrit.instructure.com/87794 Tested-by: Jenkins Reviewed-by: Jon Jensen <jon@instructure.com> Product-Review: Jon Jensen <jon@instructure.com> QA-Review: Jon Jensen <jon@instructure.com>
1 parent 6b13afc commit aa28c73

2 files changed

Lines changed: 2 additions & 1 deletion

File tree

gems/canvas_mimetype_fu/lib/canvas_mimetype_fu/mime_types.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -189,6 +189,7 @@ gsf: application/x-font-type1
189189
gtar: application/x-tar
190190
gvp: text/x-google-video-pointer
191191
gz: application/x-gzip
192+
gzip: application/gzip
192193
h: text/x-chdr
193194
h++: text/x-c++hdr
194195
hbc: application/vnd.hbci

gems/canvas_unzip/lib/canvas_unzip.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -104,7 +104,7 @@ def self.each_entry(archive_filename)
104104
file = File.open(archive_filename)
105105
mime_type = File.mime_type?(file)
106106

107-
if mime_type == 'application/x-gzip'
107+
if ['application/x-gzip', 'application/gzip'].include? mime_type
108108
file = Zlib::GzipReader.new(file)
109109
mime_type = 'application/x-tar' # it may not actually be a tar though, so rescue if there's a problem
110110
end

0 commit comments

Comments
 (0)