Latest 7.x release throws this warning:

Adv CSS/JS Agg - Content-Type The wrong Content-Type is being sent by your web server.
The web servers configuration will need to be adjusted. Was looking for
text/javascript, actually got application/javascript. You might need to apply
the drupal core patch located here https://drupal.org/node/1440534.

What is the reasoning behind this? I couldn't find any useful issue nor commit to explain this change. Note that application/javascript is Nginx default mime type for .js file extension.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

omega8cc’s picture

Title: Why is Nginx default mime type for .js is not accepted? » Why the Nginx default mime type for .js is not accepted?

Fix the title.

mikeytown2’s picture

mikeytown2’s picture

Status: Active » Fixed
FileSize
6.91 KB

This patch has been committed.

mikeytown2’s picture

This has been committed as well

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.

ErikHendrick’s picture

Adv CSS/JS Agg - The wrong Content-Type is being sent by your web server.
The web servers configuration will need to be adjusted. Was looking for application/javascript, actually got application/x-javascript. You might need to apply the drupal core patch located here https://drupal.org/node/2193333#comment-8469991.

A) NGINX
B) Applied Patch to /.htaccess but did not work

mikeytown2’s picture

Version: 7.x-2.4 » 7.x-2.x-dev
Category: Support request » Bug report
Status: Closed (fixed) » Needs work

I need to add in application/x-javascript to the list of acceptable content types for javascript.

  • mikeytown2 committed 6e05e98 on 7.x-2.x
    Issue #2186069 by mikeytown2: Add in application/x-javascript as an...
mikeytown2’s picture

Status: Needs work » Fixed
FileSize
1.31 KB

Following patch has been committed

Pinky Brain’s picture

I don't know if it helps, but the .htaccess file in "../sites/default/files/advagg_js" caused that warning in my installation. To heal it I simply changed line 26 of the .htaccess file from "Header set Content-Type text/javascript" to "Header set Content-Type application/javascript"

mikeytown2’s picture

@Pinky Brain
Have you ran update.php? did advagg_update_7203 run? That update should have taken care of the htaccess file inside of sites/default/files/advagg_js

Pinky Brain’s picture

Yes, I ran update.php. But I don't know if advagg_update_7203 ran. All I know is, that I manually changed the htaccess.

But to be fair, my system was contaminated (the SQL-injection thing, I think) and because of this I had some weird problems with advagg (after a while the css files were pointing to wrong domains).

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.