'match.group(N)' -> 'match[N]' (#7671)

2.5x faster
This commit is contained in:
Mike Fährmann
2025-06-18 12:59:37 +02:00
parent 475506cc39
commit 41191bb60a
135 changed files with 363 additions and 363 deletions

View File

@@ -332,7 +332,7 @@ class HttpRequestHandler(http.server.BaseHTTPRequestHandler):
status = 206
match = re.match(r"bytes=(\d+)-", self.headers["Range"])
start = int(match.group(1))
start = int(match[1])
headers["Content-Range"] = "bytes {}-{}/{}".format(
start, len(output)-1, len(output))