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 2022/01/18 00:33:22 UTC

[GitHub] [trafficserver] bneradt commented on pull request #8545: TSHttpTxnCacheLookupStatusGet: handle cannot respond cases

bneradt commented on pull request #8545:
URL: https://github.com/apache/trafficserver/pull/8545#issuecomment-1014973535


   > Why have a plugin for checking the cache status rather than a custom log?
   
   Thank you for taking a look at this PR.
   
   The issue this addresses (see the link)  is for the compress plugin. Namely, this code block:
   https://github.com/apache/trafficserver/blob/d0a44f86345c9125946978efbbf837a720fc9537/plugins/compress/compress.cc#L884-L891
   
   The plugin is not using the status for logging. Rather, the plugin grabs the cache status via `TSHttpTxnCacheLookupStatusGet` and conditionally performs logic if ATS is serving the object out of cache. Without this patch, the `TS_CACHE_LOOKUP_HIT_FRESH` is provided to the plugin even when the object is deemed to be something it cannot in fact reply to the client with (such as the request is a POST method but the cached object is a response to a GET request). In this case, it's a bug to call such cached objects a hit for these requests and the plugin is negatively impacted by this. This patch corrects the status in such cases to a miss.


-- 
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