File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -813,7 +813,7 @@ fn detect_mime(file_path: impl AsRef<Path>) -> &'static str {
813
813
Some ( "markdown" ) => "text/markdown" ,
814
814
Some ( "css" ) => "text/css" ,
815
815
Some ( "toml" ) => "text/toml" ,
816
- Some ( "js" ) => "application /javascript" ,
816
+ Some ( "js" ) => "text /javascript" ,
817
817
Some ( "json" ) => "application/json" ,
818
818
_ => mime,
819
819
}
@@ -852,7 +852,7 @@ mod test {
852
852
check_mime ( ".gitignore" , "text/plain" ) ;
853
853
check_mime ( "hello.toml" , "text/toml" ) ;
854
854
check_mime ( "hello.css" , "text/css" ) ;
855
- check_mime ( "hello.js" , "application /javascript" ) ;
855
+ check_mime ( "hello.js" , "text /javascript" ) ;
856
856
check_mime ( "hello.html" , "text/html" ) ;
857
857
check_mime ( "hello.hello.md" , "text/markdown" ) ;
858
858
check_mime ( "hello.markdown" , "text/markdown" ) ;
Original file line number Diff line number Diff line change @@ -158,7 +158,7 @@ mod tests {
158
158
assert_cache_control ( & resp, CachePolicy :: ForeverInCdnAndBrowser , & env. config ( ) ) ;
159
159
assert_eq ! (
160
160
resp. headers( ) . get( "Content-Type" ) ,
161
- Some ( & "application /javascript" . parse( ) . unwrap( ) ) ,
161
+ Some ( & "text /javascript" . parse( ) . unwrap( ) ) ,
162
162
) ;
163
163
assert ! ( resp. content_length( ) . unwrap( ) > 10 ) ;
164
164
assert ! ( resp. text( ) ?. contains( expected_content) ) ;
You can’t perform that action at this time.
0 commit comments