|
@@ -71,12 +71,12 @@ def _upload_chunk(text: str, query: str, channel: str = "", max_retries: int = 3
|
|
|
"text": text,
|
|
|
"ext": json.dumps({"query": query, "channel": channel or ""}, ensure_ascii=False),
|
|
|
}
|
|
|
- headers = {"Content-Type": "application/json"}
|
|
|
+ headers = {"Content-Type": "application/json; charset=utf-8"}
|
|
|
|
|
|
for attempt in range(max_retries):
|
|
|
try:
|
|
|
# 以 GET 方法发送,body 为 JSON 字符串
|
|
|
- body = json.dumps(payload, ensure_ascii=False)
|
|
|
+ body = json.dumps(payload, ensure_ascii=False).encode('utf-8')
|
|
|
resp = requests.get(CHUNK_API_URL, headers=headers, data=body, timeout=30)
|
|
|
logger.info(f"上传chunk请求体: payload={payload}")
|
|
|
try:
|