Skip to content

Commit

Permalink
fix: redirect_follow test case
Browse files Browse the repository at this point in the history
  • Loading branch information
Rileran authored and algesten committed Nov 26, 2024
1 parent af9dec9 commit 820c9e6
Showing 1 changed file with 11 additions and 2 deletions.
13 changes: 11 additions & 2 deletions src/unversioned/transport/test.rs
Original file line number Diff line number Diff line change
Expand Up @@ -290,13 +290,22 @@ fn setup_default_handlers(handlers: &mut Vec<TestHandler>) {
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,
);
Expand Down

0 comments on commit 820c9e6

Please sign in to comment.