aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test/httpd_mod.erl
diff options
context:
space:
mode:
authorMicael Karlberg <[email protected]>2011-12-20 12:43:05 +0100
committerMicael Karlberg <[email protected]>2012-02-06 12:31:58 +0100
commitd36414e480a69ae5f36b057e8cd6903d4a2f59c6 (patch)
tree25e5df03fdda7da8e56f9d9b5e139be2b99b9370 /lib/inets/test/httpd_mod.erl
parentd012c3ca920a2bfb487b4973601d92e92591d48f (diff)
downloadotp-d36414e480a69ae5f36b057e8cd6903d4a2f59c6.tar.gz
otp-d36414e480a69ae5f36b057e8cd6903d4a2f59c6.tar.bz2
otp-d36414e480a69ae5f36b057e8cd6903d4a2f59c6.zip
[inets] Testing IPv6 support on windows...
Diffstat (limited to 'lib/inets/test/httpd_mod.erl')
-rw-r--r--lib/inets/test/httpd_mod.erl23
1 files changed, 17 insertions, 6 deletions
diff --git a/lib/inets/test/httpd_mod.erl b/lib/inets/test/httpd_mod.erl
index 5016cdb9e6..6ba0624210 100644
--- a/lib/inets/test/httpd_mod.erl
+++ b/lib/inets/test/httpd_mod.erl
@@ -39,14 +39,25 @@
%% 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]),
+
+ %% This is very crude, but...
+ io:format(user,
+ "alias -> Has IPv6 support: ~p",
+ [inets_test_lib:has_ipv6_support()]),
+ Opts = case os:type() of
+ {win32, _} ->
+ [inet6fb4];
+ _ ->
+ []
+ end,
- ok = httpd_test_lib:verify_request(Type, Host, Port, Node,
+ 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 +66,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 +74,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 +82,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"},