From 24141b494b9b22d0ec50a59f19d66d6112f1a0d8 Mon Sep 17 00:00:00 2001 From: ed Date: Sun, 25 Jan 2026 21:38:18 +0000 Subject: [PATCH] another request-smuggling failsafe; could concievably help when behind a buggy reverseproxy --- copyparty/httpcli.py | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/copyparty/httpcli.py b/copyparty/httpcli.py index 3ab43d37..f0ffb1a1 100644 --- a/copyparty/httpcli.py +++ b/copyparty/httpcli.py @@ -342,11 +342,6 @@ class HttpCli(object): if not headerlines: return False - if not headerlines[0]: - # seen after login with IE6.0.2900.5512.xpsp.080413-2111 (xp-sp3) - self.log("BUG: trailing newline from previous request", c="1;31") - headerlines.pop(0) - try: self.mode, self.req, self.http_ver = headerlines[0].split(" ") @@ -355,6 +350,8 @@ class HttpCli(object): for header_line in headerlines[1:]: k, zs = header_line.split(":", 1) self.headers[k.lower()] = zs.strip() + if zs.endswith(" HTTP/1.1"): + raise Exception() except: headerlines = [repr(x) for x in headerlines] msg = "#[ " + " ]\n#[ ".join(headerlines) + " ]"