Skip to content
This repository has been archived by the owner on Dec 20, 2018. It is now read-only.

AddRedirectToHttps ignores statusCode #172

Closed
cincuranet opened this issue Nov 6, 2016 · 3 comments
Closed

AddRedirectToHttps ignores statusCode #172

cincuranet opened this issue Nov 6, 2016 · 3 comments

Comments

@cincuranet
Copy link

cincuranet commented Nov 6, 2016

When using the AddRedirectToHttps with statusCode, the statusCode is ignored. It's always 302. Same applies for AddRedirectToHttpsPermanent where 301 is expected.

I believe the problem is in RedirectToHttpsRule class here. It's using the Redirect, which defaults to 302 and the StatusCode property is ignored.

@Tratcher Tratcher added the bug label Nov 6, 2016
@Tratcher
Copy link
Member

Tratcher commented Nov 6, 2016

@muratg recomend accept for 1.1.0. Compare to the generic redirect rule:

The tests don't actually check the status code:

Assert.Equal("https://example.com/", response.Headers.Location.OriginalString);

@muratg
Copy link
Contributor

muratg commented Nov 7, 2016

(FYI for folks -- I have made the previous triage edits on the bug, not @cincuranet. Looks like there's a GH issue where it appears to put his name instead of mine.)

@mikaelm12
Copy link
Contributor

Good catch @cincuranet .
Just fixed this issue in #173

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants