diff options
Diffstat (limited to 'www/py-graphite-web/files/patch-webapp__graphite__cli__views.py')
| -rw-r--r-- | www/py-graphite-web/files/patch-webapp__graphite__cli__views.py | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/www/py-graphite-web/files/patch-webapp__graphite__cli__views.py b/www/py-graphite-web/files/patch-webapp__graphite__cli__views.py new file mode 100644 index 000000000000..5811e7863654 --- /dev/null +++ b/www/py-graphite-web/files/patch-webapp__graphite__cli__views.py @@ -0,0 +1,42 @@ +--- webapp/graphite/cli/views.py.orig 2014-09-14 03:00:52 UTC ++++ webapp/graphite/cli/views.py +@@ -40,7 +40,7 @@ + def evaluate(request): + if 'commandInput' not in request.GET: + output = commands.stderr("No commandInput parameter!") +- return HttpResponse(output, mimetype='text/plain') ++ return HttpResponse(output, content_type='text/plain') + + #Variable substitution + profile = getProfile(request) +@@ -59,7 +59,7 @@ + cmd = cmd[:i] + my_vars[var] + cmd[j:] + else: + output = commands.stderr("Unknown variable %s" % var) +- return HttpResponse(output, mimetype='text/plain') ++ return HttpResponse(output, content_type='text/plain') + + if cmd == '?': cmd = 'help' + +@@ -68,13 +68,13 @@ + + if not tokens.command: + output = commands.stderr("Invalid syntax") +- return HttpResponse(output, mimetype='text/plain') ++ return HttpResponse(output, content_type='text/plain') + + handler_name = '_' + tokens.command + handler = vars(commands).get(handler_name) + if handler is None: + output = commands.stderr("Unknown command") +- return HttpResponse(output, mimetype='text/plain') ++ return HttpResponse(output, content_type='text/plain') + + args = dict( tokens.items() ) + del args['command'] +@@ -89,4 +89,4 @@ + profile.history = '\n'.join(history) + profile.save() + +- return HttpResponse(output, mimetype='text/plain') ++ return HttpResponse(output, content_type='text/plain') |
