From 1a868080ad6a0536e49964c3a5da05d1f1a27332 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Schneider?= Date: Wed, 21 Jan 2015 11:40:57 +0100 Subject: [PATCH] filters: add a method which allows to store the request message in a string --- mandaye/filters/default.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/mandaye/filters/default.py b/mandaye/filters/default.py index 5be4cb8..216070a 100644 --- a/mandaye/filters/default.py +++ b/mandaye/filters/default.py @@ -121,3 +121,10 @@ class MandayeFilter(object): values['account'] = current_account return template_response("toolbar.html", values) + @staticmethod + def store_request_content_buffer(env, values, request): + """ on_request filter which allows to store the content of a post in request object + """ + if request.msg and not isinstance(request.msg, basestring): + request.msg = request.msg.read() +