-
Notifications
You must be signed in to change notification settings - Fork 8
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
Modify SetHeader method in the Context to enable the overriding of existing values. #839
Conversation
…der to override existing headers.
Cherry pick to beta success |
It sets the header if !response.HasStarted.
Cherry pick to beta success |
@cmurialdo : This change is ok! However, I think that the underlying implementation is loosing precision about the Cache-Control Header. For example, in LigaMX, in order Http Rest Services to be Cacheable by CDN with (stale-while-revalidate) for getting maximum perfornace, I set this:
I wonder if this is supported by GeneXus .Net Generator. This Cache Header is extremly important, as tells the CDN to go only on time to fetch the resource to the origin server, while retuning data from the Cache. It gives max scalability in an app. Maybe we should use CacheControlHeaderValue.Parse(&CacheControlHeader) instead? Ant then fallback to the original implementation if the Header cannot be parsed. (Maybe this is should be another Issue) |
Cherry pick to beta success |
You are right. That case wasn't working. I changed the code as you suggested. |
Cherry pick to beta success |
Issue:103629
Starting from #823, headers are set at the beginning of the execution. Therefore, in order for the changes made with the "SetHeader" method to take effect, overriding is necessary.