fix http block bug (#4261)

This commit is contained in:
LawyZheng
2025-12-11 03:01:03 +08:00
committed by GitHub
parent 2be36c7738
commit 0b617f6635
2 changed files with 2 additions and 2 deletions

View File

@@ -3916,7 +3916,7 @@ class HttpRequestBlock(Block):
# If files are provided, don't set default Content-Type (aiohttp will set multipart/form-data)
if not self.files:
if not self.headers.get("Content-Type") or not self.headers.get("content-type"):
if not self.headers.get("Content-Type") and not self.headers.get("content-type"):
LOG.info("Adding default content-type as application/json", headers=self.headers)
self.headers["Content-Type"] = "application/json"