Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,8 @@ proxy/config/storage.config.default
proxy/hdrs/test_mime
proxy/http2/test_Huffmancode
proxy/http2/test_Http2DependencyTree
proxy/http2/test_HPACK
proxy/http2/hpack-tests/results

plugins/header_rewrite/header_rewrite_test
plugins/experimental/esi/*_test
Expand Down
22 changes: 20 additions & 2 deletions proxy/http2/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -57,11 +57,13 @@ endif

noinst_PROGRAMS = \
test_Huffmancode \
test_Http2DependencyTree
test_Http2DependencyTree \
test_HPACK

TESTS = \
test_Huffmancode \
test_Http2DependencyTree
test_Http2DependencyTree \
test_HPACK

test_Huffmancode_LDADD = \
$(top_builddir)/lib/ts/libtsutil.la
Expand All @@ -77,3 +79,19 @@ test_Http2DependencyTree_LDADD = \
test_Http2DependencyTree_SOURCES = \
test_Http2DependencyTree.cc \
Http2DependencyTree.h

test_HPACK_LDADD = \
$(top_builddir)/proxy/hdrs/libhdrs.a \
$(top_builddir)/lib/ts/libtsutil.la \
$(top_builddir)/iocore/eventsystem/libinkevent.a \
$(top_builddir)/lib/records/librecords_p.a \
$(top_builddir)/mgmt/libmgmt_p.la \
$(top_builddir)/proxy/shared/libUglyLogStubs.a \
@HWLOC_LIBS@

test_HPACK_SOURCES = \
test_HPACK.cc \
HuffmanCodec.cc \
HuffmanCodec.h \
HPACK.cc \
HPACK.h
59 changes: 59 additions & 0 deletions proxy/http2/hpack-tests/story_00.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
{
"cases": [
{
"seqnum": 0,
"headers": [
{
":method": "GET"
},
{
":scheme": "http"
},
{
":authority": "yahoo.co.jp"
},
{
":path": "/"
}
],
"wire": "82864188f439ce75c875fa5784"
},
{
"seqnum": 1,
"headers": [
{
":method": "GET"
},
{
":scheme": "http"
},
{
":authority": "www.yahoo.co.jp"
},
{
":path": "/"
}
],
"wire": "8286418cf1e3c2fe8739ceb90ebf4aff84"
},
{
"seqnum": 2,
"headers": [
{
":method": "GET"
},
{
":scheme": "http"
},
{
":authority": "k.yimg.jp"
},
{
":path": "/images/top/sp2/cmn/logo-ns-130528.png"
}
],
"wire": "82864187eabfa35332fd2b449b60d48e62a1849eb611589825353141e63ad52160b206c4f2f5d537"
}
],
"description": "Apache Traffic Server"
}
56 changes: 56 additions & 0 deletions proxy/http2/hpack-tests/story_01.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
{
"cases": [
{
"seqnum": 0,
"headers": [
{
":scheme": "https"
},
{
":authority": "example.com"
},
{
":path": "/"
},
{
":method": "GET"
},
{
"user-agent": "hpack-test"
},
{
"cookie": "xxxxxxx1"
},
{
"x-hello": "world"
}
],
"wire": "8741882f91d35d055c87a784827a879eb193aac92a131f1187f3e7cf9f3e7c874086f2b4e5a283ff84f07b2893"
},
{
"seqnum": 1,
"headers": [
{
":scheme": "https"
},
{
":authority": "example.com"
},
{
":path": "/"
},
{
":method": "GET"
},
{
"user-agent": "hpack-test"
},
{
"cookie": "xxxxxxx2"
}
],
"wire": "87c08482bf1f1187f3e7cf9f3e7c8b"
}
],
"description": "Apache Traffic Server"
}
Loading