trafficserver-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From zw...@apache.org
Subject [1/2] trafficserver git commit: Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug
Date Tue, 02 Dec 2014 20:28:42 GMT
Repository: trafficserver
Updated Branches:
  refs/heads/5.2.x a6fb93a3d -> 7ae37495c


Fix the internal buffer sizing. Thanks to Sudheer for helping isolating this bug


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

Branch: refs/heads/5.2.x
Commit: 4b91b1a28544f595ec1e6dbfb92a1de5ec581989
Parents: a6fb93a
Author: Leif Hedstrom <zwoop@apache.org>
Authored: Tue Dec 2 13:08:40 2014 -0700
Committer: Leif Hedstrom <zwoop@apache.org>
Committed: Tue Dec 2 13:26:39 2014 -0700

----------------------------------------------------------------------
 proxy/http/HttpTransact.cc | 5 +----
 proxy/http/HttpTransact.h  | 2 --
 2 files changed, 1 insertion(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4b91b1a2/proxy/http/HttpTransact.cc
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.cc b/proxy/http/HttpTransact.cc
index 99bd2c2..fe65f81 100644
--- a/proxy/http/HttpTransact.cc
+++ b/proxy/http/HttpTransact.cc
@@ -5359,9 +5359,8 @@ HttpTransact::handle_trace_and_options_requests(State* s, HTTPHdr* incoming_hdr)
       int req_length = incoming_hdr->length_get();
       HTTP_RELEASE_ASSERT(req_length > 0);
 
-      s->internal_msg_buffer_index = 0;
-      s->internal_msg_buffer_size = req_length * 2;
       s->free_internal_msg_buffer();
+      s->internal_msg_buffer_size = req_length * 2;
 
       if (s->internal_msg_buffer_size <= max_iobuffer_size) {
         s->internal_msg_buffer_fast_allocator_size = buffer_size_to_index(s->internal_msg_buffer_size);
@@ -8073,7 +8072,6 @@ HttpTransact::build_error_response(State *s, HTTPStatus status_code,
const char
   s->free_internal_msg_buffer();
   s->internal_msg_buffer = new_msg;
   s->internal_msg_buffer_size = len;
-  s->internal_msg_buffer_index = 0;
   s->internal_msg_buffer_fast_allocator_size = -1;
 
   s->hdr_info.client_response.value_set(MIME_FIELD_CONTENT_TYPE, MIME_LEN_CONTENT_TYPE,
body_type, strlen(body_type));
@@ -8156,7 +8154,6 @@ HttpTransact::build_redirect_response(State* s)
   //////////////////////////
   // set descriptive text //
   //////////////////////////
-  s->internal_msg_buffer_index = 0;
   s->free_internal_msg_buffer();
   s->internal_msg_buffer_fast_allocator_size = -1;
   s->internal_msg_buffer = body_factory->fabricate_with_old_api_build_va("redirect#moved_temporarily",
s, 8192,

http://git-wip-us.apache.org/repos/asf/trafficserver/blob/4b91b1a2/proxy/http/HttpTransact.h
----------------------------------------------------------------------
diff --git a/proxy/http/HttpTransact.h b/proxy/http/HttpTransact.h
index 981d5bd..d55a0fb 100644
--- a/proxy/http/HttpTransact.h
+++ b/proxy/http/HttpTransact.h
@@ -916,7 +916,6 @@ public:
     char *internal_msg_buffer_type;     // out
     int64_t internal_msg_buffer_size;       // out
     int64_t internal_msg_buffer_fast_allocator_size;
-    int64_t internal_msg_buffer_index;      // out
 
     bool icp_lookup_success;    // in
     struct sockaddr_in icp_ip_result;   // in
@@ -1056,7 +1055,6 @@ public:
         internal_msg_buffer_type(NULL),
         internal_msg_buffer_size(0),
         internal_msg_buffer_fast_allocator_size(-1),
-        internal_msg_buffer_index(0),
         icp_lookup_success(false),
         scheme(-1),
         next_hop_scheme(scheme),


Mime
View raw message