Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Does not add cache header to HTTP302 redirect responses #248

Open
ImrePyhvel opened this issue Sep 27, 2018 · 0 comments
Open

Does not add cache header to HTTP302 redirect responses #248

ImrePyhvel opened this issue Sep 27, 2018 · 0 comments

Comments

@ImrePyhvel
Copy link

V2 does not allow caching redirections.

Repro
Using Strathweb.CacheOutput.WebApi2.StrongName v0.10.0
Applied attribute [CacheOutput(ClientTimeSpan = 86400)] to a webapi 2 action returning type RedirectResult.
Brauser is getting the expected HTTP302, but response does not contain any cache-control headers - caching attribute setting does not apply.

Expected behavior is that HTTP302 responses are cached as the attribute states. According to RFC 2616, section 10.3.3 302 Found:

The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.

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

No branches or pull requests

1 participant