I'm using the Masonite framework and whenever I have this code:
def another(self, Request):
return Request.redirect('/')
Whenever that is hit and it is redirecting, it will either throw a Corrupted Content error or an Infinite Redirection error depending on the browser.
Fix
This was fixed in Masonite 1.6.5 so you can just run:
and that should fix the problem.
The Problem
The problem was because of how Masonite compiled routes into a url. Some url's can be left untouched (such as redirecting to
/or/home) but some need to be compiled down such as redirecting to/dashboard/user/@user/@idso Masonite has a special method for compiling routes.Anyways, Masonite would also always prepend a
/and there was a bug that would compile the route of/into//which typically makes the browser throw that error. That has since been tested and fixed.