Repository: trafficserver Updated Branches: refs/heads/master e4347ef80 -> a12b6d29a
TS-2729: Add HTTP/2 support to ATS Fixed sign comparison and cleaned up the code Project: http://git-wip-us.apache.org/repos/asf/trafficserver/repo Commit: http://git-wip-us.apache.org/repos/asf/trafficserver/commit/a12b6d29 Tree: http://git-wip-us.apache.org/repos/asf/trafficserver/tree/a12b6d29 Diff: http://git-wip-us.apache.org/repos/asf/trafficserver/diff/a12b6d29 Branch: refs/heads/master Commit: a12b6d29a0de12623b253c99348897ae322c6693 Parents: e4347ef Author: Bryan Call <[email protected]> Authored: Mon Feb 23 14:28:23 2015 -0800 Committer: Bryan Call <[email protected]> Committed: Mon Feb 23 14:28:23 2015 -0800 ---------------------------------------------------------------------- proxy/http2/HTTP2.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/trafficserver/blob/a12b6d29/proxy/http2/HTTP2.cc ---------------------------------------------------------------------- diff --git a/proxy/http2/HTTP2.cc b/proxy/http2/HTTP2.cc index e11e8a6..ca9efaa 100644 --- a/proxy/http2/HTTP2.cc +++ b/proxy/http2/HTTP2.cc @@ -715,9 +715,9 @@ http2_parse_header_fragment(HTTPHdr * hdr, IOVec iov, Http2DynamicTable& dynamic if (name_len == MIME_LEN_TE && strncmp(name, MIME_FIELD_TE, name_len) == 0) { int value_len = 0; - const char * value = field->value_get(&value_len); - if (!(value_len == strlen("trailers") && - strncmp(value, "trailers", value_len) == 0)) { + const char *value = field->value_get(&value_len); + char trailers[] = "trailers"; + if (!(value_len == (sizeof(trailers) - 1) && memcmp(value, trailers, value_len) == 0)) { return HPACK_ERROR_HTTP2_PROTOCOL_ERROR; } }
