Repository: trafficserver
Updated Branches:
refs/heads/master 6049e2012 -> fff529523
[TS-3564]: Check if cache is enabled before setting DO_WRITE action
during 3xx redirect follow, to prevent seg fault
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/97d6fcc3
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/97d6fcc3
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/97d6fcc3
Branch: refs/heads/master
Commit: 97d6fcc39bcc20e15c46f64f0a4db9be6d46ae8c
Parents: 6049e20
Author: Sudheer Vinukonda <[email protected]>
Authored: Wed Apr 29 15:24:37 2015 +0000
Committer: Sudheer Vinukonda <[email protected]>
Committed: Wed Apr 29 15:24:37 2015 +0000
----------------------------------------------------------------------
proxy/http/HttpTransact.cc | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/97d6fcc3/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 45f6f30..e8ea5cb 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -1939,7 +1939,9 @@ HttpTransact::DecideCacheLookup(State *s)
// for redirect, we skipped cache lookup to do the automatic redirection
if (s->redirect_info.redirect_in_process) {
// without calling out the CACHE_LOOKUP_COMPLETE_HOOK
- s->cache_info.action = CACHE_DO_WRITE;
+ if (s->txn_conf->cache_http) {
+ s->cache_info.action = CACHE_DO_WRITE;
+ }
LookupSkipOpenServer(s);
} else {
// calling out CACHE_LOOKUP_COMPLETE_HOOK even when the cache
@@ -3904,8 +3906,9 @@ HttpTransact::handle_forward_server_connection_open(State
*s)
break;
default:
DebugTxn("http_trans", "[hfsco] redirect in progress, non-3xx
response, setting cache_do_write");
- if (cw_vc)
+ if (cw_vc && s->txn_conf->cache_http) {
s->cache_info.action = CACHE_DO_WRITE;
+ }
break;
}
}