From 6462816aeae228b436312886311a5677d9e2b7ad Mon Sep 17 00:00:00 2001 From: Eli Uriegas Date: Fri, 21 Apr 2017 17:13:18 -0500 Subject: [PATCH] Get rid of the `_token` attribute altogether --- sanic/request.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/sanic/request.py b/sanic/request.py index fb35c760..23aee779 100644 --- a/sanic/request.py +++ b/sanic/request.py @@ -38,7 +38,7 @@ class Request(dict): __slots__ = ( 'app', 'headers', 'version', 'method', '_cookies', 'transport', 'body', 'parsed_json', 'parsed_args', 'parsed_form', 'parsed_files', - '_ip', '_parsed_url', '_token', + '_ip', '_parsed_url', ) def __init__(self, url_bytes, headers, version, method, transport): @@ -77,9 +77,7 @@ class Request(dict): :return: token related to request """ - self._token = getattr(self, '_token', - self.headers.get('Authorization')) - return self._token + return self.headers.get('Authorization', None) @property def form(self):