]> git.ipfire.org Git - thirdparty/tornado.git/commitdiff
Merge commit 'pull/origin/1653'
authorBen Darnell <ben@bendarnell.com>
Tue, 21 Feb 2017 03:01:01 +0000 (22:01 -0500)
committerBen Darnell <ben@bendarnell.com>
Tue, 21 Feb 2017 03:01:01 +0000 (22:01 -0500)
1  2 
tornado/web.py

diff --cc tornado/web.py
index 21cc25f95764944b0ed547fa88ac746e574328e9,504becad96c35191acaeaea2faaa0c7f5a43fddc..4e932b6e773fe03ede1af168e58ce46fc03c9628
mode 100644,100755..100755
@@@ -3236,3 -3307,18 +3270,7 @@@ def _create_signature_v2(secret, s)
      hash = hmac.new(utf8(secret), digestmod=hashlib.sha256)
      hash.update(utf8(s))
      return utf8(hash.hexdigest())
 -def _unquote_or_none(s):
 -    """None-safe wrapper around url_unescape to handle unamteched optional
 -    groups correctly.
 -
 -    Note that args are passed as bytes so the handler can decide what
 -    encoding to use.
 -    """
 -    if s is None:
 -        return s
 -    return escape.url_unescape(s, encoding=None, plus=False)
 -
+ def is_absolute(path):
+     return any(path.startswith(x) for x in ["/", "http:", "https:"])