aboutsummaryrefslogtreecommitdiffstats
path: root/test/misc_SUITE.erl
diff options
context:
space:
mode:
authorLoïc Hoguin <[email protected]>2017-10-03 00:29:48 +0200
committerLoïc Hoguin <[email protected]>2017-10-03 00:30:15 +0200
commit6fc05a6d64d217b80f1dd04cd2742aeca934feb9 (patch)
tree47516065c5009ce87f549cae9315a322c9fa8fa1 /test/misc_SUITE.erl
parentb2bd9ccfb582213909129b6a54514b968856168a (diff)
downloadcowboy-6fc05a6d64d217b80f1dd04cd2742aeca934feb9.tar.gz
cowboy-6fc05a6d64d217b80f1dd04cd2742aeca934feb9.tar.bz2
cowboy-6fc05a6d64d217b80f1dd04cd2742aeca934feb9.zip
Make sure a path parsing error in the router gives a 400
Diffstat (limited to 'test/misc_SUITE.erl')
-rw-r--r--test/misc_SUITE.erl7
1 files changed, 7 insertions, 0 deletions
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),