CakePHP: HTTP Header is being interpreted as part of my static content (JS, CSS)

时间:2015-07-31 20:02:05

标签: apache cakephp squid

I'm encountering a strange error in my web app running CakePHP 2.6:

Random static content files are taking forever to load, and when they do take forever to load, they don't work properly. These files are living where I generally assumed they were supposed to: /app/webroot/css and app/webroot/js.

In this screenshot, a JS file takes 10 seconds: Static content takes forever to load.

When the static content is JavaScript, it triggers a syntax error: Syntax Error

Previewing the response, we see that the HTTP header is being interpreted as part of the script. The JS engine sees the header and throws a syntax error. enter image description here

This also happens randomly when it's a different HTTP code, like 304 Not Modified: enter image description here

An example of the response when it doesn't take forever to load:

enter image description here

And an example of the header when it doesn't take forever to load: enter image description here

Could there be something I've got misconfigured in my Cake app? The fact that this is happening seemingly randomly is really driving me nuts.

0 个答案:

没有答案