Skip to content Skip to sidebar Skip to footer

Redirection Using Wsgiref

I am working on a toy web framework and I have implemented a method redirect_to for redirecting the user to a specified URL. Here the code def _redirect_to(_self, _url): '''Takes

Solution 1:

To do a HTTP redirection, you need both:

  • 'Location' HTTP header
  • '302 Found' HTTP status code

It seems that you are not changing the HTTP status code from 200 to 302.

Post a Comment for "Redirection Using Wsgiref"