Commit 1aae698f authored by Kazuhiko Shiozaki's avatar Kazuhiko Shiozaki

component/trafficserver: fix TSHttpTxnCacheLookupStatusGet for cache existing POST case.

parent 6c6bfdd5
...@@ -40,6 +40,11 @@ configure-options = ...@@ -40,6 +40,11 @@ configure-options =
--disable-hwloc --disable-hwloc
--enable-experimental-plugins --enable-experimental-plugins
--disable-posix-cap --disable-posix-cap
patch-options = -p1
# https://github.com/apache/trafficserver/pull/8545 + https://github.com/apache/trafficserver/pull/8617
# (see https://github.com/apache/trafficserver/issues/8539 for the detail)
patches =
${:_profile_base_location_}/trafficserver-9.1.1-TSHttpTxnCacheLookupStatusGet-fix.patch#d8ed3db3a48e97eb72aaaf7d7598a2d2
environment = environment =
PATH=${libtool:location}/bin:${make:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s PATH=${libtool:location}/bin:${make:location}/bin:${patch:location}/bin:${perl:location}/bin:${pkgconfig:location}/bin:%(PATH)s
LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${luajit:location}/lib -lm LDFLAGS =-L${openssl:location}/lib -Wl,-rpath=${openssl:location}/lib -L${tcl:location}/lib -Wl,-rpath=${tcl:location}/lib -L${zlib:location}/lib -Wl,-rpath=${zlib:location}/lib -Wl,-rpath=${luajit:location}/lib -lm
......
diff -ur trafficserver-9.1.1.orig/src/traffic_server/InkAPI.cc trafficserver-9.1.1/src/traffic_server/InkAPI.cc
--- trafficserver-9.1.1.orig/src/traffic_server/InkAPI.cc 2021-10-29 15:38:50.000000000 +0000
+++ trafficserver-9.1.1/src/traffic_server/InkAPI.cc 2022-01-31 10:37:24.675347079 +0000
@@ -5443,7 +5443,11 @@
break;
case HttpTransact::CACHE_LOOKUP_HIT_WARNING:
case HttpTransact::CACHE_LOOKUP_HIT_FRESH:
- *lookup_status = TS_CACHE_LOOKUP_HIT_FRESH;
+ if (HttpTransact::need_to_revalidate(&sm->t_state)) {
+ *lookup_status = TS_CACHE_LOOKUP_MISS;
+ } else {
+ *lookup_status = TS_CACHE_LOOKUP_HIT_FRESH;
+ }
break;
case HttpTransact::CACHE_LOOKUP_SKIPPED:
*lookup_status = TS_CACHE_LOOKUP_SKIPPED;
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment