This commit is contained in:
Toshit Chawda 2024-03-23 10:05:17 -07:00
parent 595af12cb7
commit a14b54d725
No known key found for this signature in database
GPG key ID: 91480ED99E2B3D9D
7 changed files with 427 additions and 56 deletions

View file

@ -10,7 +10,7 @@ mod wrappers;
use tls_stream::EpxTlsStream;
use tokioio::TokioIo;
use udp_stream::EpxUdpStream;
use utils::{Boolinator, ReplaceErr, UriExt};
pub use utils::{Boolinator, ReplaceErr, UriExt};
use websocket::EpxWebSocket;
use wrappers::{IncomingBody, ServiceWrapper, TlsWispService, WebSocketWrapper};
@ -231,7 +231,7 @@ impl EpoxyClient {
let mut redirected = false;
let mut current_url = req.uri().clone();
let mut current_resp: EpxResponse = self.send_req_inner(req, should_redirect).await?;
for _ in 0..self.redirect_limit - 1 {
for _ in 0..self.redirect_limit {
match current_resp {
EpxResponse::Success(_) => break,
EpxResponse::Redirect((_, req)) => {