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/11/14 21:42:20 UTC
trafficserver git commit: TS-3847: Check if table size updates are at
the beginning of the block
Repository: trafficserver
Updated Branches:
refs/heads/master fc77df964 -> 7dbb358c9
TS-3847: Check if table size updates are at the beginning of the block
This closes #333
Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo
Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/7dbb358c
Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/7dbb358c
Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/7dbb358c
Branch: refs/heads/master
Commit: 7dbb358c95ec661de7cdfad5ceefbef0a9c0e2e5
Parents: fc77df9
Author: Masakazu Kitajo <mk...@yahoo-corp.jp>
Authored: Sat Nov 14 12:42:02 2015 -0800
Committer: Bryan Call <bc...@apache.org>
Committed: Sat Nov 14 12:42:02 2015 -0800
----------------------------------------------------------------------
proxy/http2/HTTP2.cc | 6 ++++++
1 file changed, 6 insertions(+)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/trafficserver/blob/7dbb358c/proxy/http2/HTTP2.cc
----------------------------------------------------------------------
diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc
index ce10d62..16a72fa 100644
--- a/proxy/http2/HTTP2.cc
+++ b/proxy/http2/HTTP2.cc
@@ -584,6 +584,7 @@ http2_decode_header_blocks(HTTPHdr *hdr, const uint8_t *buf_start, const uint8_t
const uint8_t *cursor = buf_start;
HdrHeap *heap = hdr->m_heap;
HTTPHdrImpl *hh = hdr->m_http;
+ bool header_field_started = false;
while (cursor < buf_end) {
int64_t read_bytes = 0;
@@ -600,6 +601,7 @@ http2_decode_header_blocks(HTTPHdr *hdr, const uint8_t *buf_start, const uint8_t
return HPACK_ERROR_COMPRESSION_ERROR;
}
cursor += read_bytes;
+ header_field_started = true;
break;
case HPACK_FIELD_INDEXED_LITERAL:
case HPACK_FIELD_NOINDEX_LITERAL:
@@ -609,8 +611,12 @@ http2_decode_header_blocks(HTTPHdr *hdr, const uint8_t *buf_start, const uint8_t
return HPACK_ERROR_COMPRESSION_ERROR;
}
cursor += read_bytes;
+ header_field_started = true;
break;
case HPACK_FIELD_TABLESIZE_UPDATE:
+ if (header_field_started) {
+ return HPACK_ERROR_COMPRESSION_ERROR;
+ }
read_bytes = update_dynamic_table_size(cursor, buf_end, dynamic_table);
if (read_bytes == HPACK_ERROR_COMPRESSION_ERROR) {
return HPACK_ERROR_COMPRESSION_ERROR;