Guess a file attachment's content type if application/octet-stream.
Review Request #6016 — Created June 22, 2014 and submitted — Latest diff uploaded
If a browser claims a file's content type is
application/octet-stream
,
get a second opinion by askingfile --mime-type
. This helps with some
browsers or server setups where that useless mimetype is being used,
preventing some files from being reviewable.
Faked the
application/octet-stream
mimetype on a file (by setting it just
before this conditional) and saw that the uploaded .c file was reviewable.
Before the conditional fix, it was uploaded with theapplication/octet-stream
mimetype.