aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets
diff options
context:
space:
mode:
authorFredrik Gustafsson <[email protected]>2013-08-21 11:23:20 +0200
committerFredrik Gustafsson <[email protected]>2013-08-21 11:23:20 +0200
commit6450814d8a9d55962dcb830a01faababd70a6ebd (patch)
treee608e814b940f00384a6eb7ed8d932f9ff6b6298 /lib/inets
parentc8ef69c8204969b96eb8642ff0e2d057e18c7882 (diff)
downloadotp-6450814d8a9d55962dcb830a01faababd70a6ebd.tar.gz
otp-6450814d8a9d55962dcb830a01faababd70a6ebd.tar.bz2
otp-6450814d8a9d55962dcb830a01faababd70a6ebd.zip
inets: added simple testcase for option erl_script_nocache
Diffstat (limited to 'lib/inets')
-rw-r--r--lib/inets/test/httpd_basic_SUITE.erl25
1 files changed, 24 insertions, 1 deletions
diff --git a/lib/inets/test/httpd_basic_SUITE.erl b/lib/inets/test/httpd_basic_SUITE.erl
index 523cf9d38c..fef0a1f0f4 100644
--- a/lib/inets/test/httpd_basic_SUITE.erl
+++ b/lib/inets/test/httpd_basic_SUITE.erl
@@ -33,7 +33,8 @@ suite() -> [{ct_hooks,[ts_install_cth]}].
all() ->
[
uri_too_long_414,
- header_too_long_413,
+ header_too_long_413,
+ erl_script_nocache_opt,
escaped_url_in_error_body,
slowdose
].
@@ -178,6 +179,28 @@ header_too_long_413(Config) when is_list(Config) ->
{version, "HTTP/1.1"}]),
inets:stop(httpd, Pid).
+%%-------------------------------------------------------------------------
+%%-------------------------------------------------------------------------
+
+erl_script_nocache_opt(doc) ->
+ ["Test that too long headers's get 413 HTTP code"];
+erl_script_nocache_opt(suite) ->
+ [];
+erl_script_nocache_opt(Config) when is_list(Config) ->
+ HttpdConf = ?config(httpd_conf, Config),
+ {ok, Pid} = inets:start(httpd, [{port, 0}, {erl_script_nocache, true} | HttpdConf]),
+ Info = httpd:info(Pid),
+ Port = proplists:get_value(port, Info),
+ _Address = proplists:get_value(bind_address, Info),
+ URL1 = ?URL_START ++ integer_to_list(Port),
+ case httpc:request(get, {URL1 ++ "/dummy.html", []},
+ [{url_encode, false},
+ {version, "HTTP/1.0"}],
+ [{full_result, false}]) of
+ {ok, {200, _}} ->
+ ok
+ end,
+ inets:stop(httpd, Pid).
%%-------------------------------------------------------------------------
%%-------------------------------------------------------------------------