From 7f4962077e8da23c89477af67416ae2ae5223783 Mon Sep 17 00:00:00 2001 From: Marek Czernek Date: Mon, 15 Sep 2025 11:48:31 +0200 Subject: [PATCH] Strip CRLF from headers before parsing --- changelog/68328.fixed.md | 1 + salt/fileclient.py | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 changelog/68328.fixed.md diff --git a/changelog/68328.fixed.md b/changelog/68328.fixed.md new file mode 100644 index 000000000000..2bffecb8483b --- /dev/null +++ b/changelog/68328.fixed.md @@ -0,0 +1 @@ +Fixed cp.cache_file when using Tornado > 6.4 diff --git a/salt/fileclient.py b/salt/fileclient.py index 34f12728c8cd..8b43cac21f28 100644 --- a/salt/fileclient.py +++ b/salt/fileclient.py @@ -744,7 +744,7 @@ def on_header(hdr): # Check the status line of the HTTP request if write_body[0] is None: try: - hdr = parse_response_start_line(hdr) + hdr = parse_response_start_line(hdr.strip()) except HTTPInputError: # Not the first line, do nothing return