Play Framework 2.1 returns HTTP headers instead of JavaScript

When I request a public asset in Play Framework 2.1, I get HTTP headers instead of a JavScript / asset source.

I have this problem in Safari on the iPad, it happens often on random JavaScript files.

In my index.html, I request several js files:

<script src='@routes.Assets.at("javascripts/libs/moment.js")'></script> <script src='@routes.Assets.at("javascripts/libs/underscore.js")'></script> <script src='@routes.Assets.at("javascripts/libs/backbone.js")'></script> <script src='@routes.Assets.at("javascripts/bridge/component.js")'></script> 

The console starts playback mode in

 play run 

When I request a file in Safari, I get a response showing HTTP headers instead of JavaScript code. My question is what might cause this behavior?

enter image description here

+4
source share
2 answers

You can see in your screenshot that you are showing a debug console that usually shows headers, etc. You need to expand the actual browser window to see the contents of the response.

0
source

We are experimenting with the same problem in the iPad application. The closure seems to be related to the assets of Playframework and iPad.

We must create a problem in the game, as this is hardly reproducible.

We also use Play 2.1

0
source

All Articles