Resource interpreted as Script but transferred with MIME type application/dart -


i sending dart file via httpserver, whenever it, chrome says:

"resource interpreted script transferred mime type application/dart: "http://localhost:8000/dart/game.dart"." 

the line client is:

<script type="application/dart" src="dart/game.dart"></script> 

and line give file is:

if(new regexp("/dart/(.*)").hasmatch(uri)){     new file("static/" + uri.substring(1)).exists().then((bool exists){       if(!exists) return;         new file("static/" + uri.substring(1)).readasstring().then((string contents){           if(uri.substring(uri.length - 2, uri.length) == "js")             request.response.headers.contenttype = new contenttype("application", "javascript", charset: "utf-8");           else             request.response.headers.contenttype = new contenttype("application", "dart");            request.response.write(contents);           request.response.close();       });     });   } 

when go directly url, gives me file; , google chrome networking says this:

remote address:127.0.0.1:8000 request url:http://localhost:8000/dart/game.dart request method:get status code:200 ok request headersview source accept:*/* accept-encoding:gzip, deflate, sdch accept-language:en-us,en;q=0.8 cache-control:max-age=0 connection:keep-alive host:localhost:8000 referer:http://localhost:8000/play user-agent:mozilla/5.0 (windows nt 6.1; wow64) applewebkit/537.36 (khtml, gecko) chrome/39.0.2171.71 safari/537.36 response headersview source content-type:application/dart transfer-encoding:chunked x-content-type-options:nosniff x-frame-options:sameorigin x-xss-protection:1; mode=block 

what can do?


Comments

Popular posts from this blog

python - mat is not a numerical tuple : openCV error -

c# - MSAA finds controls UI Automation doesn't -

wordpress - .htaccess: RewriteRule: bad flag delimiters -