Fix redirect

This commit is contained in:
2025-08-31 21:18:45 -05:00
parent a1d70a6c54
commit 12f17f9b81

View File

@@ -257,7 +257,7 @@ namespace Tesses::Framework::Http
Uri uri2; Uri uri2;
if(req.followRedirects && (this->statusCode == MovedPermanently || this->statusCode == PermanentRedirect || this->statusCode == TemporaryRedirect) && this->responseHeaders.TryGetFirst("Location",location) && uri.Relative(location, uri2)) if(req.followRedirects && (this->statusCode == MovedPermanently || this->statusCode == PermanentRedirect || this->statusCode == TemporaryRedirect || this->statusCode == SeeOther || this->statusCode == Found) && this->responseHeaders.TryGetFirst("Location",location) && uri.Relative(location, uri2))
{ {
this->responseHeaders.Clear(); this->responseHeaders.Clear();