From 8454c5bfcbc1c4524b7aedd53a5a2e7da454ca9e Mon Sep 17 00:00:00 2001 From: Rebecca Graber Date: Thu, 30 Sep 2021 12:12:29 -0400 Subject: [PATCH] chore: lint --- openedx/core/lib/request_utils.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/openedx/core/lib/request_utils.py b/openedx/core/lib/request_utils.py index 9359e62a6e..19851e4dd5 100644 --- a/openedx/core/lib/request_utils.py +++ b/openedx/core/lib/request_utils.py @@ -23,7 +23,7 @@ COURSE_REGEX = re.compile(fr'^(.*?/courses/)(?!v[0-9]+/[^/]+){settings.COURSE_ID # .. toggle_name: request_utils.capture_cookie_sizes # .. toggle_implementation: WaffleFlag # .. toggle_default: False -# .. toggle_description: Enables detailed capturing of cookie sizes for monitoring purposes. This can be useful for tracking +# .. toggle_description: Enables more detailed capturing of cookie sizes for monitoring purposes. This can be useful for tracking # down large cookies if requests are nearing limits on the total size of cookies. See the CookieMonitoringMiddleware # docstring for details on the monitoring custom attributes that will be set. # .. toggle_warnings: Enabling this flag will add a number of custom attributes, and could adversely affect other @@ -146,10 +146,9 @@ class CookieMonitoringMiddleware(MiddlewareMixin): """ - if (request.META.get('HTTP_COOKIE', None)): + if request.META.get('HTTP_COOKIE', None): set_custom_attribute('cookies.header.size', len(request.META['HTTP_COOKIE'].encode('utf-8'))) - if not CAPTURE_COOKIE_SIZES.is_enabled(): return