trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bc...@apache.org
Subject git commit: TS-2632 Fixes to check the new configs properly
Date Mon, 09 Jun 2014 20:51:26 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/5.0.x 04d883ed5 -> 88deda79d


TS-2632 Fixes to check the new configs properly


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

Branch: refs/heads/5.0.x
Commit: 88deda79dc3e8408e50af4771a894d3af2a741fa
Parents: 04d883e
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Mon Jun 9 14:47:24 2014 -0600
Committer: Bryan Call <bcall@apache.org>
Committed: Mon Jun 9 13:51:07 2014 -0700

----------------------------------------------------------------------
 proxy/http/HttpSM.cc       | 2 ++
 proxy/http/HttpTransact.cc | 7 +++++--
 2 files changed, 7 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/88deda79/proxy/http/HttpSM.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpSM.cc b/proxy/http/HttpSM.cc
index 1d455cd..2302e5d 100644
--- a/proxy/http/HttpSM.cc
+++ b/proxy/http/HttpSM.cc
@@ -4037,6 +4037,8 @@ HttpSM::parse_range_and_compare(MIMEField *field, int64_t content_length)
 
   if (content_length <= 0)
     return;
+
+  // ToDo: Can this really happen?
   if (content_length == INT64_MAX) {
     t_state.range_setup = HttpTransact::RANGE_NOT_HANDLED;
     return;

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/88deda79/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 7d028f8..8956849 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -1846,7 +1846,9 @@ HttpTransact::OSDNSLookup(State* s)
       StartAccessControl(s);    // If skip_dns is enabled and no ip based rules in cache.config
and parent.config
       // Access Control is called after DNS response
     } else {
-      if ((s->cache_info.action == CACHE_DO_NO_ACTION) && s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE))
{
+      if ((s->cache_info.action == CACHE_DO_NO_ACTION) &&
+          (((s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE) && !s->txn_conf->cache_range_write)
||
+            s->range_setup == RANGE_NOT_SATISFIABLE || s->range_setup == RANGE_NOT_HANDLED)))
{
         TRANSACT_RETURN(SM_ACTION_API_OS_DNS, HandleCacheOpenReadMiss);
       } else if (s->cache_lookup_result == HttpTransact::CACHE_LOOKUP_SKIPPED) {
         TRANSACT_RETURN(SM_ACTION_API_OS_DNS, LookupSkipOpenServer);
@@ -3083,7 +3085,8 @@ HttpTransact::HandleCacheOpenReadMiss(State* s)
   // We must, however, not cache the responses to these requests.
   if (does_method_require_cache_copy_deletion(s->method) && s->api_req_cacheable
== false) {
     s->cache_info.action = CACHE_DO_NO_ACTION;
-  } else if (s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE)) {
+  } else if ((s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE) && !s->txn_conf->cache_range_write)
||
+             s->range_setup == RANGE_NOT_SATISFIABLE || s->range_setup == RANGE_NOT_HANDLED)
{
     s->cache_info.action = CACHE_DO_NO_ACTION;
   } else {
     s->cache_info.action = CACHE_PREPARE_TO_WRITE;


Mime
View raw message