aboutsummaryrefslogtreecommitdiffstats
path: root/test/dispatcher_prop.erl
diff options
context:
space:
mode:
Diffstat (limited to 'test/dispatcher_prop.erl')
-rw-r--r--test/dispatcher_prop.erl8
1 files changed, 5 insertions, 3 deletions
diff --git a/test/dispatcher_prop.erl b/test/dispatcher_prop.erl
index 163fcd8..26c4f87 100644
--- a/test/dispatcher_prop.erl
+++ b/test/dispatcher_prop.erl
@@ -49,12 +49,14 @@ prop_split_host_symmetric() ->
?FORALL(Server, server(),
begin case cowboy_dispatcher:split_host(Server) of
{Tokens, RawHost, undefined} ->
- (Server == RawHost) and (Server == binary_join(Tokens, "."));
+ (Server == RawHost)
+ and (Server == binary_join(lists:reverse(Tokens), "."));
{Tokens, RawHost, Port} ->
PortBin = (list_to_binary(":" ++ integer_to_list(Port))),
(Server == << RawHost/binary, PortBin/binary >>)
- and (Server == << (binary_join(Tokens, "."))/binary,
- PortBin/binary >>)
+ and (Server ==
+ << (binary_join(lists:reverse(Tokens), "."))/binary,
+ PortBin/binary >>)
end end).
%% Internal.