dotnet/systemweb-adapters

Add `Redirect` and `RedirectPermanent` to `HttpResponseBase` and `HttpResponseWrapper`.

AvremelM opened this issue · 2 comments

Summary

Adds Redirect and RedirectPermanent methods to HttpResponseBase and HttpResponseWrapper classes.

Motivation and goals

These APIs are part of System.Web.HttpResponseBase and System.Web.HttpResponseWrapper in .NET 4.0

Looks like this possibly(?) could have been added after #102 or #233, when these methods were added to HttpResponse.

Examples

HttpResponseBase response = new HttpContextWrapper(HttpContext.Current).Response;

response.Redirect(newUrl);
response.Redirect(newUrl, true);

response.RedirectPermanent(newUrl);
response.RedirectPermanent(newUrl, true);

I've begun adding support for this here.

I'm having a bit of trouble getting my local environment set up for this repo.

Edit: Took me a while to figure out how I was supposed to open this solution and build/package it.
It might be worthwhile to have the basics documented somewhere, e.g., README.md or CONTRIBUTING.md
I would write it myself, but I honestly don't understand it well enough.

Any way to expedite this merge? I have two relatively straightforward PRs (#473 and #477) that are ready to merge, (afaict). Just need someone to look over them.

Sorry to be a bother, just have a few projects that are waiting on these.