You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by bc...@apache.org on 2015/08/27 01:17:51 UTC

[1/2] trafficserver git commit: TS-3860 Avoid buffer overflow in debug builds

Repository: trafficserver
Updated Branches:
  refs/heads/6.0.x 1b6dcea63 -> 361b42b37


TS-3860 Avoid buffer overflow in debug builds

This will instead copy the header data from the HPACK struct
to the Hdr.

(cherry picked from commit b081f52e347e5363e512067313a51837713e5741)


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

Branch: refs/heads/6.0.x
Commit: 67d63854f3870df34972b3d691a9f453ce973f4b
Parents: 1b6dcea
Author: Ryo Okubo <ro...@yahoo-corp.jp>
Authored: Wed Aug 26 13:35:46 2015 -0600
Committer: Bryan Call <bc...@apache.org>
Committed: Wed Aug 26 16:17:14 2015 -0700

----------------------------------------------------------------------
 proxy/http2/HTTP2.cc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/67d63854/proxy/http2/HTTP2.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index b635f48..b6e34b0 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -556,7 +556,7 @@ http2_write_psuedo_headers(HTTPHdr *in, uint8_t *out, uint64_t out_len, Http2Dyn
     // Add 'Status:' dummy header field
     MIMEField *status_field = mime_field_create(in->m_heap, in->m_http->m_fields_impl);
     mime_field_name_value_set(in->m_heap, in->m_mime, status_field, -1, HPACK_VALUE_STATUS, HPACK_LEN_STATUS, status_str,
-                              HPACK_LEN_STATUS_VALUE_STR, true, HPACK_LEN_STATUS + HPACK_LEN_STATUS_VALUE_STR, 0);
+                              HPACK_LEN_STATUS_VALUE_STR, 0, HPACK_LEN_STATUS + HPACK_LEN_STATUS_VALUE_STR, true);
     mime_hdr_field_attach(in->m_mime, status_field, 1, NULL);
 
     // Encode psuedo headers by HPACK
@@ -1013,7 +1013,7 @@ REGRESSION_TEST(HPACK_Encode)(RegressionTest *t, int, int *pstatus)
 
       MIMEField *field = mime_field_create(headers->m_heap, headers->m_http->m_fields_impl);
       mime_field_name_value_set(headers->m_heap, headers->m_http->m_fields_impl, field, -1, expected_name, strlen(expected_name),
-                                expected_value, strlen(expected_value), true, strlen(expected_name) + strlen(expected_value), 1);
+                                expected_value, strlen(expected_value), 1, strlen(expected_name) + strlen(expected_value), true);
       mime_hdr_field_attach(headers->m_http->m_fields_impl, field, 1, NULL);
     }
 


[2/2] trafficserver git commit: TS-3869: HTTP/2 Stream uses the clients window size for the servers setting

Posted by bc...@apache.org.
TS-3869: HTTP/2 Stream uses the clients window size for the servers setting

(cherry picked from commit 4c81be14eefe196018c9d12be6cefca35793f92b)


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

Branch: refs/heads/6.0.x
Commit: 361b42b377923a38ff01c966476490071d806f07
Parents: 67d6385
Author: Bryan Call <bc...@apache.org>
Authored: Wed Aug 26 16:04:57 2015 -0700
Committer: Bryan Call <bc...@apache.org>
Committed: Wed Aug 26 16:17:34 2015 -0700

----------------------------------------------------------------------
 proxy/http2/Http2ConnectionState.h | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/trafficserver/blob/361b42b3/proxy/http2/Http2ConnectionState.h
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index f959526..ba0b7fd 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -100,7 +100,7 @@ class Http2Stream
 {
 public:
   Http2Stream(Http2StreamId sid = 0, ssize_t initial_rwnd = Http2::initial_window_size)
-    : client_rwnd(initial_rwnd), server_rwnd(initial_rwnd), header_blocks(NULL), header_blocks_length(0), request_header_length(0),
+    : client_rwnd(initial_rwnd), server_rwnd(Http2::initial_window_size), header_blocks(NULL), header_blocks_length(0), request_header_length(0),
       end_stream(false), _id(sid), _state(HTTP2_STREAM_STATE_IDLE), _fetch_sm(NULL), body_done(false), data_length(0)
   {
     _thread = this_ethread();