Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions src/debug_toolbar/litestar/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

from __future__ import annotations

import gzip
import logging
import re
import time
Expand Down Expand Up @@ -490,8 +491,6 @@ def _inject_toolbar(self, body: bytes, context: RequestContext, content_encoding
Tuple of (modified body, content_encoding to use).
If gzip was decompressed, returns uncompressed body with empty encoding.
"""
import gzip

# Handle gzip-compressed responses
is_gzipped = content_encoding.lower() == "gzip"
if is_gzipped:
Expand Down