mirror of
https://github.com/BerriAI/litellm.git
synced 2026-11-15 09:12:18 +00:00
test(gateway): read the many-header response with the raw client
The hyper test client has the same 100-header default the fix lifts, so it rejected the relayed response itself Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
parent
37c27147d8
commit
7fbdc9a38d
1 changed files with 6 additions and 11 deletions
|
|
@ -183,19 +183,14 @@ async fn relays_a_response_with_more_headers_than_hyper_allows_by_default() {
|
|||
}))
|
||||
.await;
|
||||
let gateway = Gateway::start(upstream).await;
|
||||
let mut raw = gateway.connect().await;
|
||||
|
||||
let response = within(
|
||||
client().request(
|
||||
axum::http::Request::get(gateway.url("/v1/chat/completions"))
|
||||
.body(Body::empty())
|
||||
.unwrap(),
|
||||
),
|
||||
)
|
||||
.await
|
||||
.unwrap();
|
||||
raw.send("GET /v1/chat/completions HTTP/1.1\r\nhost: public.example\r\n\r\n")
|
||||
.await;
|
||||
|
||||
assert_eq!(response.status(), StatusCode::OK);
|
||||
assert_eq!(response.headers()["llm_provider-x-149"], "v");
|
||||
let head = within(raw.response_head()).await.unwrap();
|
||||
assert_eq!(head.status, StatusCode::OK);
|
||||
assert_eq!(head.header("llm_provider-x-149"), Some(&b"v"[..]));
|
||||
}
|
||||
|
||||
#[rstest]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue