- return serve(request, "%s/media/%s" % (skin, path),
- document_root=os.path.join(os.path.dirname(os.path.dirname(__file__)),'skins').replace('\\','/'))
+ response = serve(request, "%s/media/%s" % (skin, path),
+ document_root=os.path.join(os.path.dirname(os.path.dirname(__file__)), 'skins').replace('\\', '/'))
+ content_type = response['Content-Type']
+ if ('charset=' not in content_type):
+ if (content_type.startswith('text') or content_type=='application/x-javascript'):
+ content_type += '; charset=utf-8'
+ response['Content-Type'] = content_type
+ return response
+