diff options
author | Craig Tiller <craig.tiller@gmail.com> | 2015-12-11 14:20:03 -0800 |
---|---|---|
committer | Craig Tiller <craig.tiller@gmail.com> | 2015-12-11 14:20:03 -0800 |
commit | d56550ad6d5a81e1481b159acda0bb789c7d16ad (patch) | |
tree | 9a54b3575e599e3a18e633d71ce86e761d083a64 /test/core | |
parent | 795764bf3afcc482917b250193166667e26185c0 (diff) |
Test invalid accept-encoding values
Diffstat (limited to 'test/core')
-rw-r--r-- | test/core/bad_client/tests/badreq.c | 14 | ||||
-rw-r--r-- | test/core/bad_client/tests/badreq_algorithm.headers | 11 |
2 files changed, 25 insertions, 0 deletions
diff --git a/test/core/bad_client/tests/badreq.c b/test/core/bad_client/tests/badreq.c index d90388158d..3130a09654 100644 --- a/test/core/bad_client/tests/badreq.c +++ b/test/core/bad_client/tests/badreq.c @@ -96,5 +96,19 @@ int main(int argc, char **argv) { "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)", GRPC_BAD_CLIENT_DISCONNECT); + /* bad accept-encoding algorithm */ + GRPC_RUN_BAD_CLIENT_TEST(verifier, + PFX_STR + "\x00\x00\xd2\x01\x04\x00\x00\x00\x01" + "\x10\x05:path\x08/foo/bar" + "\x10\x07:scheme\x04http" + "\x10\x07:method\x04POST" + "\x10\x0a:authority\x09localhost" + "\x10\x0c""content-type\x10""application/grpc" + "\x10\x14grpc-accept-encoding\x1enobody-knows-the-trouble-i-see" + "\x10\x02te\x08trailers" + "\x10\x0auser-agent\"bad-client grpc-c/0.12.0.0 (linux)", + GRPC_BAD_CLIENT_DISCONNECT); + return 0; } diff --git a/test/core/bad_client/tests/badreq_algorithm.headers b/test/core/bad_client/tests/badreq_algorithm.headers new file mode 100644 index 0000000000..ff3e613f93 --- /dev/null +++ b/test/core/bad_client/tests/badreq_algorithm.headers @@ -0,0 +1,11 @@ +# headers used in badreq.c +# use tools/codegen/core/gen_header_frame.py to generate the binary strings +# contained in the source code +:path: /foo/bar +:scheme: http +:method: POST +:authority: localhost +content-type: application/grpc +grpc-accept-encoding: nobody-knows-the-trouble-i-see +te: trailers +user-agent: bad-client grpc-c/0.12.0.0 (linux) |