You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@trafficserver.apache.org by GitBox <gi...@apache.org> on 2023/01/06 21:18:52 UTC
[GitHub] [trafficserver] lzx404243 opened a new pull request, #9288: Updated logic for server no-cache and no-store
lzx404243 opened a new pull request, #9288:
URL: https://github.com/apache/trafficserver/pull/9288
This PR fixes #9283.
### issues prior to this change
* With `ignore_server_no_cache = 0`(honoring the directives), ATS would determine responses containing `no-cache` as non-cacheable, while those should be cacheable but just require revalidation on future requests.
* With `ignore_server_no_cache = 1`(ignoring the directives), ATS fails to ignore the 'no-cache' and `no-store` in responses while it is asked to.
After this change, ATS handles `no-cache` and `no-store` in responses correctly, both when configured to honor and ignore them.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on pull request #9288: Updated logic for server no-cache and no-store
Posted by GitBox <gi...@apache.org>.
bneradt commented on PR #9288:
URL: https://github.com/apache/trafficserver/pull/9288#issuecomment-1374672937
@zwoop and I discussed this and we decided to mark this for 9.2.x with the intention that it will go into 9.2.1.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt merged pull request #9288: Updated logic for server no-cache and no-store
Posted by GitBox <gi...@apache.org>.
bneradt merged PR #9288:
URL: https://github.com/apache/trafficserver/pull/9288
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org
[GitHub] [trafficserver] bneradt commented on a diff in pull request #9288: Updated logic for server no-cache and no-store
Posted by GitBox <gi...@apache.org>.
bneradt commented on code in PR #9288:
URL: https://github.com/apache/trafficserver/pull/9288#discussion_r1063833654
##########
proxy/http/HttpTransactHeaders.cc:
##########
@@ -421,14 +421,14 @@ HttpTransactHeaders::calculate_document_age(ink_time_t request_time, ink_time_t
}
bool
-HttpTransactHeaders::does_server_allow_response_to_be_stored(HTTPHdr *resp)
+HttpTransactHeaders::does_server_allow_response_to_be_stored(HTTPHdr *resp, bool ignore_no_store_and_no_cache_directives)
{
- uint32_t cc_mask = (MIME_COOKED_MASK_CC_NO_CACHE | MIME_COOKED_MASK_CC_NO_STORE | MIME_COOKED_MASK_CC_PRIVATE);
+ uint32_t cc_mask = MIME_COOKED_MASK_CC_PRIVATE | (ignore_no_store_and_no_cache_directives ? 0 : MIME_COOKED_MASK_CC_NO_STORE);
Review Comment:
Note that removing `MIME_COOKED_MASK_CC_NO_CACHE` is intentional here because, per the RFC, `no-cache` doesn't mean that the proxy can't store the response (that's what `no-store` means), rather it means that future requests for the object has to revalidate it with the origin before sending the cached response to the client.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: github-unsubscribe@trafficserver.apache.org
For queries about this service, please contact Infrastructure at:
users@infra.apache.org