Fixed so inlinefuncs are only parses on the outgoing message path.

This commit is contained in:
Griatch 2016-05-26 14:56:09 +02:00
parent 1f685f6952
commit 7c3d072915

View file

@ -172,7 +172,8 @@ class SessionHandler(dict):
# wrong encoding set on the session. Set it to a safe one
session.protocol_flags["ENCODING"] = "utf-8"
data = to_str(to_unicode(data), encoding=session.protocol_flags["ENCODING"])
if _INLINEFUNC_ENABLED and not raw:
if _INLINEFUNC_ENABLED and not raw and isinstance(self, ServerSessionHandler):
# only parse inlinefuncs on the outgoing path (sessionhandler->)
data = parse_inlinefunc(data, strip=strip_inlinefunc, session=session)
return data
elif hasattr(data, "id") and hasattr(data, "db_date_created") \