Updated Branches: refs/heads/master 05b0af2ea -> 71b9502f3
TS-1446: Make sure age header is enabled. The RFC dictates that we must enable the age header if we are returning stale content. This has been overridable since e24e79d. This now just makes sure we do this when serving stale content. Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d334458d Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d334458d Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d334458d Branch: refs/heads/master Commit: d334458d751555b6536776adec5548e5af887243 Parents: 05b0af2 Author: Phil Sorber <[email protected]> Authored: Thu Sep 6 20:15:38 2012 -0400 Committer: Phil Sorber <[email protected]> Committed: Fri Oct 19 16:03:39 2012 -0400 ---------------------------------------------------------------------- plugins/experimental/rfc5861/rfc5861.c | 2 ++ 1 files changed, 2 insertions(+), 0 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d334458d/plugins/experimental/rfc5861/rfc5861.c ---------------------------------------------------------------------- diff --git a/plugins/experimental/rfc5861/rfc5861.c b/plugins/experimental/rfc5861/rfc5861.c index 46973e8..9720365 100644 --- a/plugins/experimental/rfc5861/rfc5861.c +++ b/plugins/experimental/rfc5861/rfc5861.c @@ -585,6 +585,7 @@ rfc5861_plugin(TSCont cont, TSEvent event, void *edata) TSDebug(LOG_PREFIX, "Looks like we can return fresh info and validate in the background"); // lookup async + TSHttpTxnConfigIntSet(txn, TS_CONFIG_HTTP_INSERT_AGE_IN_RESPONSE, 1); // Set warning header TSHttpTxnHookAdd(txn, TS_HTTP_SEND_RESPONSE_HDR_HOOK, cont); @@ -605,6 +606,7 @@ rfc5861_plugin(TSCont cont, TSEvent event, void *edata) else if ((now - chi->date) < (chi->max_age + chi->stale_on_error)) { TSDebug(LOG_PREFIX, "Looks like we can return fresh data on 500 error"); + TSHttpTxnConfigIntSet(txn, TS_CONFIG_HTTP_INSERT_AGE_IN_RESPONSE, 1); //lookup sync state->async_req = false; state->txn = txn;
