diff options
author | Micael Karlberg <[email protected]> | 2012-02-06 15:26:28 +0100 |
---|---|---|
committer | Micael Karlberg <[email protected]> | 2012-02-06 15:26:28 +0100 |
commit | b2eeb740c6e013055603aaaee1570550d380b720 (patch) | |
tree | e332e7f1270c6de2103fc7d163999a27ba4e40e8 /lib/inets/test/httpd_mod.erl | |
parent | dcf35c1ef914f7473bb64fa9175af2cf42744885 (diff) | |
parent | 0d580acdc51bd88a0d364b76ac35fcf2506c2d9e (diff) | |
download | otp-b2eeb740c6e013055603aaaee1570550d380b720.tar.gz otp-b2eeb740c6e013055603aaaee1570550d380b720.tar.bz2 otp-b2eeb740c6e013055603aaaee1570550d380b720.zip |
Merge branch 'bmk/inets/httpc/checking_ipv6_on_windows' into bmk/inets/inets59_integration
Diffstat (limited to 'lib/inets/test/httpd_mod.erl')
-rw-r--r-- | lib/inets/test/httpd_mod.erl | 31 |
1 files changed, 21 insertions, 10 deletions
diff --git a/lib/inets/test/httpd_mod.erl b/lib/inets/test/httpd_mod.erl index 5016cdb9e6..25a03ab9c8 100644 --- a/lib/inets/test/httpd_mod.erl +++ b/lib/inets/test/httpd_mod.erl @@ -39,14 +39,24 @@ %% Test cases starts here. %%------------------------------------------------------------------------- alias(Type, Port, Host, Node) -> -%% io:format(user, "~w:alias -> entry with" + %% io:format(user, "~w:alias -> entry with" %% "~n Type: ~p" %% "~n Port: ~p" %% "~n Host: ~p" %% "~n Node: ~p" %% "~n", [?MODULE, Type, Port, Host, Node]), - - ok = httpd_test_lib:verify_request(Type, Host, Port, Node, + + %% This is very crude, but... + tsp("alias -> Has IPv6 support: ~p", [inets_test_lib:has_ipv6_support()]), + Opts = case os:type() of + {win32, _} -> + [inet6fb4]; + _ -> + [] + end, + tsp("alias -> Opts: ~p", [Opts]), + + ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node, "GET /pics/icon.sheet.gif " "HTTP/1.0\r\n\r\n", [{statuscode, 200}, @@ -55,7 +65,7 @@ alias(Type, Port, Host, Node) -> {header, "Date"}, {version, "HTTP/1.0"}]), - ok = httpd_test_lib:verify_request(Type, Host, Port, Node, + ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node, "GET / HTTP/1.0\r\n\r\n", [{statuscode, 200}, {header, "Content-Type","text/html"}, @@ -63,7 +73,7 @@ alias(Type, Port, Host, Node) -> {header, "Date"}, {version, "HTTP/1.0"}]), - ok = httpd_test_lib:verify_request(Type,Host,Port,Node, + ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node, "GET /misc/ HTTP/1.0\r\n\r\n", [{statuscode, 200}, {header, "Content-Type","text/html"}, @@ -71,8 +81,8 @@ alias(Type, Port, Host, Node) -> {header, "Date"}, {version, "HTTP/1.0"}]), - %% Check redirection if trailing slash is missing. - ok = httpd_test_lib:verify_request(Type,Host,Port,Node, + %% Check redirection if trailing slash is missing. + ok = httpd_test_lib:verify_request(Type, Host, Port, Opts, Node, "GET /misc HTTP/1.0\r\n\r\n", [{statuscode, 301}, {header, "Location"}, @@ -1032,9 +1042,10 @@ check_lists_members1(L1,L2) -> %% tsp(F) -> -%% tsp(F, []). -%% tsp(F, A) -> -%% test_server:format("~p ~p:" ++ F ++ "~n", [self(), ?MODULE | A]). +%% inets_test_lib:tsp(F). +tsp(F, A) -> + inets_test_lib:tsp(F, A). + tsf(Reason) -> test_server:fail(Reason). |