zwoop commented on code in PR #13238:
URL: https://github.com/apache/trafficserver/pull/13238#discussion_r3363715303
##########
plugins/prefetch/plugin.cc:
##########
@@ -521,9 +520,10 @@ contHandleFetch(const TSCont contp, TSEvent event, void
*edata)
}
switch (event) {
- case TS_EVENT_HTTP_POST_REMAP: {
- /* Use the cache key since this has better lookup behavior when using
plugins like the cachekey plugin,
- * for example multiple URIs can match a single cache key */
+ case TS_EVENT_HTTP_CACHE_LOOKUP_COMPLETE: {
+ /* CACHE_LOOKUP_COMPLETE is the earliest hook at which
TSHttpTxnCacheLookupUrlGet is
+ * guaranteed to return a populated URL: the core does not initialize the
cache lookup
+ * URL until HttpTransact::HandleRequest runs, which happens after
POST_REMAP returns. */
if (data->frontend() && data->secondPass()) {
Review Comment:
I think this is just a matter of adding a
```
TSHandleMLocRelease(reqBuffer, TS_NULL_MLOC, reqHdrLoc);
```
when it fails to appendCacheKey().
--
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: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]