From 6fc05a6d64d217b80f1dd04cd2742aeca934feb9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Lo=C3=AFc=20Hoguin?= Date: Tue, 3 Oct 2017 00:29:48 +0200 Subject: Make sure a path parsing error in the router gives a 400 --- test/misc_SUITE.erl | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'test') diff --git a/test/misc_SUITE.erl b/test/misc_SUITE.erl index a848e44..1e0012e 100644 --- a/test/misc_SUITE.erl +++ b/test/misc_SUITE.erl @@ -39,6 +39,13 @@ init_dispatch(_) -> {"/", hello_h, []} ]}]). +router_invalid_path(Config) -> + doc("Ensure a path with invalid percent-encoded characters results in a 400."), + ConnPid = gun_open(Config), + Ref = gun:get(ConnPid, "/version/path/%\\u0016\\u0016/path"), + {response, _, 400, _} = gun:await(ConnPid, Ref), + ok. + set_env(Config) -> doc("Live replace a middleware environment value."), ConnPid1 = gun_open(Config), -- cgit v1.2.3