You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am opening this issue for discussion due to some inconsistent behaviour, coming from ActiveStorage #identify method...
There is an inconsistent behaviour in method Marcel::MimeType.for concerning (at least) javascript files starting with comments and given specific declared types (text/javascript or application/x-javascript). For example:
Of course, the explanation is that on (generated) file lib/marcel/tables.rb there are definitions only for type application/javascript so the above behaviour is somehow expected.
The thing is that on file data/tika.xml, we have reference for types text/javascript and application/x-javascript, as they are described as "alias" of application/javascript.
So my question is, should we change the script/generate_tables.rb script in order to also take into consideration the aliases, when adding values on constants TYPE_EXTS and TYPE_PARENTS?? Something like:
Note that Tika has switched text/javascript to become the canonical type with application/javascript as an alias. We'll be able to do that in Marcel with a 1.1 release.
I am opening this issue for discussion due to some inconsistent behaviour, coming from ActiveStorage
#identify
method...There is an inconsistent behaviour in method
Marcel::MimeType.for
concerning (at least) javascript files starting with comments and given specific declared types (text/javascript
orapplication/x-javascript
). For example:Of course, the explanation is that on (generated) file lib/marcel/tables.rb there are definitions only for type
application/javascript
so the above behaviour is somehow expected.The thing is that on file data/tika.xml, we have reference for types
text/javascript
andapplication/x-javascript
, as they are described as "alias" ofapplication/javascript
.marcel/data/tika.xml
Lines 335 to 340 in 8e28563
So my question is, should we change the script/generate_tables.rb script in order to also take into consideration the aliases, when adding values on constants
TYPE_EXTS
andTYPE_PARENTS
?? Something like:Thanks!
The text was updated successfully, but these errors were encountered: