Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions tests/common/test_server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,9 @@ pub async fn start_test_server() -> (u16, TestServerHandle) {
)
.route(
"/echo-referer",
post(async move |headers: HeaderMap| {
post(async move |headers: HeaderMap, _body: Bytes| {
// This endpoint tests request-header policy, not early responses. Consume the
// request body before replying so response delivery cannot race body completion.
let referer = headers
.get("referer")
.and_then(|h| h.to_str().ok())
Expand All @@ -202,7 +204,9 @@ pub async fn start_test_server() -> (u16, TestServerHandle) {
)
.route(
"/echo-credentials",
post(async move |headers: HeaderMap| {
post(async move |headers: HeaderMap, _body: Bytes| {
// Like /echo-referer, keep the fixture focused on header semantics by
// consuming the request body before constructing the response.
let authorization = headers
.get("authorization")
.and_then(|h| h.to_str().ok())
Expand Down
Loading