From: David Kerkeslager Date: Thu, 28 Nov 2019 18:36:49 +0000 (-0500) Subject: Fix exception from improperly imported http.cookies X-Git-Url: https://code.kerkeslager.com/?a=commitdiff_plain;h=70c1ae8864769025ffec24822985a310377c69df;p=fwx Fix exception from improperly imported http.cookies --- diff --git a/phial.py b/phial.py index 5d083d3..411c077 100644 --- a/phial.py +++ b/phial.py @@ -1,5 +1,5 @@ import collections -import http.cookie +import http.cookies import json import urllib.parse @@ -49,9 +49,9 @@ class Request(_Request): content_length = 0 try: - cookie = http.cookie.SimpleCookie(env.get('HTTP_COOKIE')) + cookie = http.cookies.SimpleCookie(env.get('HTTP_COOKIE')) except: - cookie = http.cookie.SimpleCookie() + cookie = http.cookies.SimpleCookie() try: @@ -218,7 +218,7 @@ def route_on_method(**kwargs): handlers[method] = kwargs.pop(method) method_not_allowed_handler = kwargs.pop( - method_not_allowed, + 'method_not_allowed', default_method_not_allowed_handler, )