From 460453987d95c2e39f39f694a481dc234e7f7a0d Mon Sep 17 00:00:00 2001 From: Luca Dei Zotti Date: Fri, 25 Feb 2022 10:32:33 +0100 Subject: [PATCH] [add] test showing issue #122 --- test/bypass_test.exs | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/test/bypass_test.exs b/test/bypass_test.exs index 6f41000..65af233 100644 --- a/test/bypass_test.exs +++ b/test/bypass_test.exs @@ -587,4 +587,22 @@ defmodule BypassTest do Bypass.open(:error) end end + + test "Strange formed paths" do + path = "/a/strange/path/dotted:strange.string.that.may:happen" + path_parts = ["a", "strange", "path", "dotted:strange.string.that.may:happen"] + + bypass = Bypass.open() + + Bypass.expect( + bypass, + "POST", + path_parts, + fn conn -> + Plug.Conn.send_resp(conn, 200, "") + end + ) + + assert {:ok, 200, ""} = request(bypass.port, path) + end end