From 820c9e653c95d179d910068c76e86d8fed3a3ca4 Mon Sep 17 00:00:00 2001 From: Rileran Date: Mon, 25 Nov 2024 23:47:36 +0100 Subject: [PATCH] fix: redirect_follow test case --- src/unversioned/transport/test.rs | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) diff --git a/src/unversioned/transport/test.rs b/src/unversioned/transport/test.rs index 54a4f291..ae20f69c 100644 --- a/src/unversioned/transport/test.rs +++ b/src/unversioned/transport/test.rs @@ -290,13 +290,22 @@ fn setup_default_handlers(handlers: &mut Vec) { TestHandler::new("/redirect-to", |_uri, _req, w| { write!( w, - "HTTP/1.1 302 OK\r\n\ + "HTTP/1.1 302 FOUND\r\n\ Location: /get\r\n\ Content-Length: 22\r\n\ \r\n\ You've been redirected\ ", - ) + )?; + write!( + w, + "HTTP/1.1 200 OK\r\n\ + Content-Type: application/json\r\n\ + Content-Length: {}\r\n\ + \r\n", + HTTPBIN_GET.as_bytes().len() + )?; + w.write_all(HTTPBIN_GET.as_bytes()) }), handlers, );