Repository: trafficserver
Updated Branches:
  refs/heads/master 461008e5a -> 6d4005f8b


TS-2494: we should return the stale cached copy if the os is down,
even if the status is not 200 (ok). For example: 404 (not found)


Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/6d4005f8
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/6d4005f8
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/6d4005f8

Branch: refs/heads/master
Commit: 6d4005f8ba15956b1d322d5ecd7c88ed050fb871
Parents: 461008e
Author: weijin <taorui...@taobao.com>
Authored: Wed Feb 26 15:04:22 2014 +0800
Committer: weijin <taorui...@taobao.com>
Committed: Wed Feb 26 15:17:28 2014 +0800

----------------------------------------------------------------------
 CHANGES                    | 2 ++
 proxy/http/HttpTransact.cc | 2 +-
 2 files changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6d4005f8/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 667c39a..150a243 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,6 +1,8 @@
                                                          -*- coding: utf-8 -*-
 Changes with Apache Traffic Server 5.0.0
 
+  *) [TS-2494] fix the crash that return the stale cached document
+   when os is down, even if it`s status is not 200 (ok).
   *) [TS-2590] Translate documentation into Japanese.
    Authors: Masaori Koshiba <masaori...@gmail.com>
             Masakazu Kitajo <m4s...@gmail.com>

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/6d4005f8/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 9692d99..650b09f 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -4286,7 +4286,7 @@ 
HttpTransact::handle_cache_operation_on_forward_server_response(State* s)
           s->next_action = HttpTransact::SERVE_FROM_CACHE;
         }
 
-        client_response_code = HTTP_STATUS_OK;
+        client_response_code = 
s->cache_info.object_read->response_get()->status_get();
       }
 
       ink_assert(base_response->valid());

Reply via email to