File tree Expand file tree Collapse file tree
trusted-server-adapter-fastly/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -238,10 +238,7 @@ async fn route_request(
238238 // Response already sent via stream_to_client()
239239 return None ;
240240 }
241- Ok ( PublisherResponse :: PassThrough {
242- mut response,
243- body,
244- } ) => {
241+ Ok ( PublisherResponse :: PassThrough { mut response, body } ) => {
245242 // Binary pass-through: reattach body and send via send_to_client().
246243 // This preserves Content-Length and avoids chunked encoding overhead.
247244 // Fastly streams the body from its internal buffer — no WASM
Original file line number Diff line number Diff line change @@ -275,8 +275,8 @@ pub enum PublisherResponse {
275275 params : OwnedProcessResponseParams ,
276276 } ,
277277 /// Non-processable 2xx response (images, fonts, video). The caller must:
278- /// 1. Call `finalize_response()` on the response
279- /// 2. Reattach the body via `response.set_body(body)`
278+ /// 1. Reattach the body via ` response.set_body(body)`
279+ /// 2. Call `finalize_response()` on the response
280280 /// 3. Call `response.send_to_client()`
281281 ///
282282 /// `Content-Length` is preserved — the body is unmodified. Using
@@ -819,10 +819,9 @@ mod tests {
819819 // pass-through doesn't process, so the host is irrelevant.
820820 let should_process = false ;
821821 let is_success = true ;
822- let request_host_empty = true ;
823- // In production: enters the `!should_process || request_host.is_empty()` block,
824- // then the PassThrough guard checks `is_success && !should_process` — host irrelevant.
825- let _enters_early_return = !should_process || request_host_empty;
822+ // In production, empty host enters the early-return block via
823+ // `!should_process || request_host.is_empty()`. The PassThrough guard
824+ // checks `is_success && !should_process` — host is irrelevant.
826825 let should_pass_through = is_success && !should_process;
827826 assert ! (
828827 should_pass_through,
You can’t perform that action at this time.
0 commit comments