CodeSleeve/asset-pipeline — pull request #57 by eviweb (2013-10-30 11:26:13+00:00)
Title: CSS from a sub directory of a custom mixed library directory is served as JS

Hi,

when using a custom library containing both scripts and stylesheets (see an example of configuration below)

'paths' => array(
'/custom/mixed/library/directory' => 'javascripts,stylesheets',
),

a request for a css file contained in a sub directory (ie `css/requested-file.css`) results in serving it with the content type : `application/javascript`.
This comes from that the validation process of file extensions is not constrained to stylesheets (in that case) and javascripts are checked first.

The provided fix is a little bit advanced than simply hard-coding types, but it should be more flexible.