Skip to content
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions changelog/68328.fixed.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Fixed cp.cache_file when using Tornado > 6.4
2 changes: 1 addition & 1 deletion salt/fileclient.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Copy link
Contributor

@bdrx312 bdrx312 Sep 15, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hdr.strip() is also called back on like 688: if not hdr.strip() and "Content-Type" not in write_body[1]:. Maybe refactor this to an assignment stripped_hdr = hdr.strip() on line 685 and use stripped_hdr everywhere hdr is used.

Also can you rename this return variable to something like response_start? parse_response_start_line does not return a header and this is very confusing that we assign the response to the same hdr variable name. Or we could go ahead and split out the tuple since we only care about the code (_, code, *_) = parse_response_start_line(hdr.strip())

except HTTPInputError:
# Not the first line, do nothing
return
Expand Down
Loading