Skip to content

Commit a6f3c83

Browse files
committed
fix: health endpoint requires Accept: text/event-stream header
The Axum router requires SSE headers for all endpoints, including /health. Added back the Accept: text/event-stream header to health check.
1 parent 9967278 commit a6f3c83

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

test_http_agentic_tools.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -139,9 +139,14 @@
139139
def check_server():
140140
"""Check if HTTP server is running."""
141141
try:
142-
# Health endpoint returns plain text "OK"
143-
response = requests.get(f"{BASE_URL}/health", timeout=2)
144-
if response.status_code == 200 and response.text.strip() == "OK":
142+
# Health endpoint requires Accept: text/event-stream header
143+
response = requests.get(
144+
f"{BASE_URL}/health",
145+
headers={"Accept": "text/event-stream"},
146+
timeout=2
147+
)
148+
# Health returns "OK" as plain text even with SSE header
149+
if response.status_code == 200 and "OK" in response.text:
145150
print(f"✓ Server is running at {BASE_URL}")
146151
return True
147152
else:

0 commit comments

Comments
 (0)