fix: 修复命令行工具

This commit is contained in:
root
2025-07-12 13:44:57 +08:00
parent 81035caf0e
commit 31de1e5a4d
30 changed files with 2728 additions and 1755 deletions

View File

@@ -62,9 +62,17 @@ class JSONRPCHTTPHandler(BaseHTTPRequestHandler):
# 处理JSON-RPC请求
response_data = self.method_registry.handle_request(request_data)
# 发送响应
self._send_json_response(response_data)
# 如果响应为None表示响应已经异步发送不需要额外响应
if response_data is not None:
# 发送响应
self._send_json_response(response_data)
else:
# 发送空的200响应表示请求已处理但无需响应体
self.send_response(200)
if self.config.cors_enabled:
self._send_cors_headers()
self.end_headers()
except Exception as e:
if self.config.debug: