[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358723#comment-14358723 ] Sudheer Vinukonda commented on TS-3331: --- Would it be better to use the bool {{cacheable}} that is already set in the below line, instead of duplicating the header checking inside {{is_negative_caching_appropriate}}? {{https://github.com/apache/trafficserver/blob/master/proxy/http/HttpTransact.cc#L4045}} It looks like, the {{cacheable}} state calls {{is_response_cacheable}}, which seems more comprehensive than the new checks added in {{is_negative_caching_appropriate}} . negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Labels: review Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358785#comment-14358785 ] Sudheer Vinukonda commented on TS-3331: --- yeah, something like that - It also keeps {{is_negative_caching_appropriate}} a little bit more readable with very minimal logic :=) negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Labels: review Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14358775#comment-14358775 ] William Bardwell commented on TS-3331: -- So... {noformat} --- a/proxy/http/HttpTransact.cc +++ b/proxy/http/HttpTransact.cc @@ -198,10 +198,7 @@ is_negative_caching_appropriate(HttpTransact::State* s) case HTTP_STATUS_BAD_GATEWAY: case HTTP_STATUS_SERVICE_UNAVAILABLE: case HTTP_STATUS_GATEWAY_TIMEOUT: -return ((response_cacheable_indicated_by_cc(s-hdr_info.server_response) = 0) - (HttpTransactHeaders::does_server_allow_response_to_be_stored(s-hdr_info.server_response) || -s-cache_control.ignore_server_no_cache || -(s-cache_control.ttl_in_cache 0))); +return true; default: break; } @@ -4263,7 +4260,7 @@ HttpTransact::handle_cache_operation_on_forward_server_response(State* s) client_response_code = server_response_code; base_response = s-hdr_info.server_response; -s-negative_caching = is_negative_caching_appropriate(s); +s-negative_caching = is_negative_caching_appropriate(s) cacheable; // determine the correct cache action given the original cache action, // cacheability of server response, and request method {noformat} Hum, let me see if that works... negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Labels: review Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14359187#comment-14359187 ] William Bardwell commented on TS-3331: -- Re-did it as suggested in https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;a=commit;h=e5f2bb554eb33e9b29cf728d2bcb04ba4f1b0e8a negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Labels: review Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14356129#comment-14356129 ] William Bardwell commented on TS-3331: -- Commit bd62e7006547e9fc174a764b2c219f774643a31a in trafficserver's branch refs/heads/master [ https://git-wip-us.apache.org/repos/asf?p=trafficserver.git;h=bd62e70 ] negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Labels: review Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14353884#comment-14353884 ] Leif Hedstrom commented on TS-3331: --- William, you going to land this? negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Labels: review Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295513#comment-14295513 ] Bryan Call commented on TS-3331: Looks like the patch is missing some code? I only see a declaration of a function. negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)
[jira] [Commented] (TS-3331) negative responses cached even when headers indicate otherwise
[ https://issues.apache.org/jira/browse/TS-3331?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanelfocusedCommentId=14295512#comment-14295512 ] Bryan Call commented on TS-3331: Looks like the patch is missing some code? I only see a declaration of a function. negative responses cached even when headers indicate otherwise -- Key: TS-3331 URL: https://issues.apache.org/jira/browse/TS-3331 Project: Traffic Server Issue Type: Bug Components: Core Reporter: William Bardwell Assignee: William Bardwell Fix For: 5.3.0 Negative type status codes get cached even when there are Cache-Control: no-store or the like headers and positive caching would be paying attention to that. So the fix is to apply response headers (and general caching config) to negative caching choices too. My patch might fix [TS-2633] 406 negative responses being cached for too long -- This message was sent by Atlassian JIRA (v6.3.4#6332)