Files

14 lines
418 B
Diff

# django__django-15498
# Loki Mode Multi-Agent Patch
# Attempts: 1
--- a/django/views/static.py
+++ b/django/views/static.py
@@ -75,6 +75,8 @@ def was_modified_since(header=None, mtime=0, size=0):
"""
try:
+ if header is None or len(header) == 0:
+ raise ValueError("Empty or missing header")
matches = re.match(
r"^([^;]+)(; length=([0-9]+))?$",
header,