aboutsummaryrefslogtreecommitdiffhomepage
path: root/test/core/http
diff options
context:
space:
mode:
authorGravatar David Garcia Quintas <dgq@google.com>2016-04-27 19:15:12 -0700
committerGravatar David Garcia Quintas <dgq@google.com>2016-04-27 19:15:12 -0700
commit12e111c6929a689f37fd18deebe5ca64a088094f (patch)
treecbcfbb5be704f3b8bcd99672194684e608a7d662 /test/core/http
parentd312a0b866b0223bf9d5a2c88530a5cd7005c990 (diff)
parente2fd65343e468735676485ba0e3517401c7db1b5 (diff)
Merge branch 'master' of github.com:grpc/grpc into lb_pollset_propagation
Diffstat (limited to 'test/core/http')
-rw-r--r--test/core/http/parser_test.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/test/core/http/parser_test.c b/test/core/http/parser_test.c
index 10936754d9..7fdf60cc2b 100644
--- a/test/core/http/parser_test.c
+++ b/test/core/http/parser_test.c
@@ -238,6 +238,11 @@ int main(int argc, char **argv) {
"\r\n"
"hello world!",
200, "hello world!", "xyz", "abc", NULL);
+ test_succeeds(split_modes[i],
+ "HTTP/1.1 200 OK\n"
+ "\n"
+ "abc",
+ 200, "abc", NULL);
test_request_succeeds(split_modes[i],
"GET / HTTP/1.0\r\n"
"\r\n",
@@ -264,6 +269,11 @@ int main(int argc, char **argv) {
"xyz",
"GET", GRPC_HTTP_HTTP10, "/", "xyz", "xyz", "abc",
NULL);
+ test_request_succeeds(split_modes[i],
+ "GET / HTTP/1.0\n"
+ "\n"
+ "xyz",
+ "GET", GRPC_HTTP_HTTP10, "/", "xyz", NULL);
test_fails(split_modes[i], "HTTP/1.0\r\n");
test_fails(split_modes[i], "HTTP/1.2\r\n");
test_fails(split_modes[i], "HTTP/1.0 000 XYX\r\n");
@@ -281,6 +291,7 @@ int main(int argc, char **argv) {
test_fails(split_modes[i], "GET / HTTP/0.0\r\n");
test_fails(split_modes[i], "GET / ____/1.0\r\n");
test_fails(split_modes[i], "GET / HTTP/1.2\r\n");
+ test_fails(split_modes[i], "GET / HTTP/1.0\n");
tmp1 = gpr_malloc(2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH);
memset(tmp1, 'a', 2 * GRPC_HTTP_PARSER_MAX_HEADER_LENGTH - 1);