From: Ben Darnell Date: Tue, 21 Feb 2017 03:01:01 +0000 (-0500) Subject: Merge commit 'pull/origin/1653' X-Git-Tag: v4.5.0~34 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=95c4408ee0068618815557137eadf17886c50d9e;p=thirdparty%2Ftornado.git Merge commit 'pull/origin/1653' --- 95c4408ee0068618815557137eadf17886c50d9e diff --cc tornado/web.py index 21cc25f95,504becad9..4e932b6e7 mode 100644,100755..100755 --- a/tornado/web.py +++ b/tornado/web.py @@@ -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:"])