You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@trafficserver.apache.org by zw...@apache.org on 2015/04/07 22:55:37 UTC
[1/2] trafficserver git commit: TS-3480 Large stream id cause
PROTOCOL_ERROR
Repository: trafficserver
Updated Branches:
refs/heads/master 8d01176a9 -> 07f707195
TS-3480 Large stream id cause PROTOCOL_ERROR
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/d38fc0a1
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/d38fc0a1
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/d38fc0a1
Branch: refs/heads/master
Commit: d38fc0a1d2d7b95eb801a3bde009d59acdb98559
Parents: 8d01176
Author: Ryo Okubo <ro...@yahoo-corp.jp>
Authored: Tue Apr 7 14:48:20 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Apr 7 14:50:29 2015 -0600
----------------------------------------------------------------------
proxy/http2/Http2ConnectionState.cc | 9 ++++++++-
proxy/http2/Http2ConnectionState.h | 5 ++++-
2 files changed, 12 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d38fc0a1/proxy/http2/Http2ConnectionState.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.cc b/proxy/http2/Http2ConnectionState.cc
index bad37a0..1e50b57 100644
--- a/proxy/http2/Http2ConnectionState.cc
+++ b/proxy/http2/Http2ConnectionState.cc
@@ -713,7 +713,7 @@ Http2ConnectionState::create_stream(Http2StreamId new_id)
// Endpoints MUST NOT exceed the limit set by their peer. An endpoint
// that receives a HEADERS frame that causes their advertised concurrent
// stream limit to be exceeded MUST treat this as a stream error.
- if (new_id >= client_settings.get(HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS)) {
+ if (client_streams_count >= client_settings.get(HTTP2_SETTINGS_MAX_CONCURRENT_STREAMS)) {
return NULL;
}
@@ -721,6 +721,9 @@ Http2ConnectionState::create_stream(Http2StreamId new_id)
stream_list.push(new_stream);
latest_streamid = new_id;
+ ink_assert(client_streams_count < UINT32_MAX);
+ ++client_streams_count;
+
return new_stream;
}
@@ -759,6 +762,7 @@ Http2ConnectionState::cleanup_streams()
delete s;
s = next;
}
+ client_streams_count = 0;
}
void
@@ -792,6 +796,9 @@ Http2ConnectionState::delete_stream(Http2Stream *stream)
{
stream_list.remove(stream);
delete stream;
+
+ ink_assert(client_streams_count > 0);
+ --client_streams_count;
}
void
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/d38fc0a1/proxy/http2/Http2ConnectionState.h
----------------------------------------------------------------------
diff --git a/proxy/http2/Http2ConnectionState.h b/proxy/http2/Http2ConnectionState.h
index 9d1ce1d..8f33542 100644
--- a/proxy/http2/Http2ConnectionState.h
+++ b/proxy/http2/Http2ConnectionState.h
@@ -189,7 +189,7 @@ class Http2ConnectionState : public Continuation
public:
Http2ConnectionState()
: Continuation(NULL), ua_session(NULL), client_rwnd(Http2::initial_window_size), server_rwnd(Http2::initial_window_size),
- stream_list(), latest_streamid(0), continued_id(0)
+ stream_list(), latest_streamid(0), client_streams_count(0), continued_id(0)
{
SET_HANDLER(&Http2ConnectionState::main_event_handler);
}
@@ -277,6 +277,9 @@ private:
DLL<Http2Stream> stream_list;
Http2StreamId latest_streamid;
+ // Counter for current acive streams which is started by client
+ uint32_t client_streams_count;
+
// The buffer used for storing incomplete fragments of a header field which consists of multiple frames.
Http2StreamId continued_id;
IOVec continued_buffer;
[2/2] trafficserver git commit: Add TS-3480,
fix indentation on others.
Posted by zw...@apache.org.
Add TS-3480, fix indentation on others.
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/07f70719
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/07f70719
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/07f70719
Branch: refs/heads/master
Commit: 07f707195b37c8f14091301b7f7443e86e79062e
Parents: d38fc0a
Author: Leif Hedstrom <zw...@apache.org>
Authored: Tue Apr 7 14:50:23 2015 -0600
Committer: Leif Hedstrom <zw...@apache.org>
Committed: Tue Apr 7 14:52:18 2015 -0600
----------------------------------------------------------------------
CHANGES | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/07f70719/CHANGES
----------------------------------------------------------------------
diff --git a/CHANGES b/CHANGES
index 5773407..5f0dbe9 100644
--- a/CHANGES
+++ b/CHANGES
@@ -1,17 +1,21 @@
-*- coding: utf-8 -*-
Changes with Apache Traffic Server 6.0.0
+ *) [TS-3480] Large stream id cause PROTOCOL_ERROR.
+ Author: Ryo Okubo <ro...@yahoo-corp.jp>.
+
*) [TS-3504] Only read "proxy.config.cache.ram_cache.use_seen_filter" once.
Do not set up a callback.
- *) [TS-3503] Add ua_first_read to milestones to track when the first byte was
- read from the client
+ *) [TS-3503] Add ua_first_read to milestones to track when the first byte
+ was read from the client.
- *) [TS-3450]: rename header_rewrite condition INTERNAL-TRANSACTION as INTERNAL-TXN
- in-line with the changes in [TS-3449]
+ *) [TS-3450]: rename header_rewrite condition INTERNAL-TRANSACTION as
+ INTERNAL-TXN in-line with the changes in [TS-3449].
*) [TS-3449]: Deprecate TSHttpIsInternalRequest and TSHttpIsInternalSession
- and replace them with TSHttpTxnIsInternal, TSHttpSsnIsInternal respectively
+ and replace them with TSHttpTxnIsInternal, TSHttpSsnIsInternal
+ respectively.
*) [TS-3475] Add a few records.config options for controlling the HTTP/2
SETTINGS. Thanks to Masakazu for all the reviews and additions.