trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject svn commit: r1180274 - /trafficserver/traffic/trunk/proxy/http/HttpTransact.cc
Date Fri, 07 Oct 2011 23:00:02 GMT
Author: zwoop
Date: Fri Oct  7 23:00:02 2011
New Revision: 1180274

URL: http://svn.apache.org/viewvc?rev=1180274&view=rev
Log:
Undo the premature commit of TS-824

Modified:
    trafficserver/traffic/trunk/proxy/http/HttpTransact.cc

Modified: trafficserver/traffic/trunk/proxy/http/HttpTransact.cc
URL: http://svn.apache.org/viewvc/trafficserver/traffic/trunk/proxy/http/HttpTransact.cc?rev=1180274&r1=1180273&r2=1180274&view=diff
==============================================================================
--- trafficserver/traffic/trunk/proxy/http/HttpTransact.cc (original)
+++ trafficserver/traffic/trunk/proxy/http/HttpTransact.cc Fri Oct  7 23:00:02 2011
@@ -2303,6 +2303,7 @@ HttpTransact::HandleCacheOpenReadHitFres
 void
 HttpTransact::CallOSDNSLookup(State* s)
 {
+//printf("into HttpTransact::CallOSDNSLookup **\n");
   TRANSACT_RETURN(DNS_LOOKUP, OSDNSLookup);
 }
 
@@ -2716,8 +2717,10 @@ HttpTransact::build_response_from_cache(
       // only if the cached response is a 200 OK
       if (client_response_code == HTTP_STATUS_OK && client_request->presence(MIME_PRESENCE_RANGE))
{
         s->state_machine->do_range_setup_if_necessary();
-        if (s->range_setup == RANGE_NOT_SATISFIABLE && s->http_config_param->reverse_proxy_enabled)
{
+        if (s->range_setup == RANGE_NOT_SATISFIABLE &&
+            s->http_config_param->reverse_proxy_enabled) {
           build_error_response(s, HTTP_STATUS_RANGE_NOT_SATISFIABLE, "Requested Range Not
Satisfiable","","");
+
           s->cache_info.action = CACHE_DO_NO_ACTION;
           s->next_action = PROXY_INTERNAL_CACHE_NOOP;
           break;
@@ -4105,6 +4108,7 @@ HttpTransact::handle_cache_operation_on_
 
     } else if (s->cache_info.action == CACHE_DO_UPDATE && is_request_conditional(&s->hdr_info.server_request))
{
       // CACHE_DO_UPDATE and server response is cacheable
+
       if (is_request_conditional(&s->hdr_info.client_request)) {
         if (s->txn_conf->cache_when_to_revalidate != 4)
           client_response_code =
@@ -4128,25 +4132,12 @@ HttpTransact::handle_cache_operation_on_
           base_response = &s->hdr_info.server_response;
         }
       } else {
-        if (s->hdr_info.client_request.presence(MIME_PRESENCE_RANGE)) {
-          s->state_machine->do_range_setup_if_necessary();
-          if (s->range_setup == RANGE_NOT_SATISFIABLE || s->range_setup == RANGE_NOT_HANDLED)
{
-            base_response = &s->hdr_info.server_response;
-            build_error_response(s, HTTP_STATUS_RANGE_NOT_SATISFIABLE, "Requested Range Not
Satisfiable","","");
-            s->cache_info.action = CACHE_DO_NO_ACTION;
-            s->next_action = PROXY_INTERNAL_CACHE_NOOP;
-          } else {
-            s->cache_info.action = CACHE_DO_SERVE_AND_UPDATE;
-            s->next_action = SERVE_FROM_CACHE;
-          }
+        if (s->method == HTTP_WKSIDX_HEAD) {
+          s->cache_info.action = CACHE_DO_UPDATE;
+          s->next_action = SERVER_READ;
         } else {
-          if (s->method == HTTP_WKSIDX_HEAD) {
-            s->cache_info.action = CACHE_DO_UPDATE;
-            s->next_action = SERVER_READ;
-          } else {
-            s->cache_info.action = CACHE_DO_SERVE_AND_UPDATE;
-            s->next_action = SERVE_FROM_CACHE;
-          }
+          s->cache_info.action = CACHE_DO_SERVE_AND_UPDATE;
+          s->next_action = SERVE_FROM_CACHE;
         }
         /* base_response will be set after updating headers below */
       }



Mime
View raw message