aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-11-07 10:25:16 +0100
committerIngela Anderton Andin <[email protected]>2017-11-09 09:56:15 +0100
commit4dcabdcc5ab7f41189ec3937e84b323d80d6df57 (patch)
tree0d1b43faac84e28f2cabf4a1dbe020b84087cf72 /lib/inets/test
parent3e8c1ff94c0a73df71daadd4eb782c21c49f22d9 (diff)
downloadotp-4dcabdcc5ab7f41189ec3937e84b323d80d6df57.tar.gz
otp-4dcabdcc5ab7f41189ec3937e84b323d80d6df57.tar.bz2
otp-4dcabdcc5ab7f41189ec3937e84b323d80d6df57.zip
inets: Add missing guard
Add test in the correct place which was the reason the guard became missing without being noticed.
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/http_format_SUITE.erl5
-rw-r--r--lib/inets/test/httpd_SUITE.erl7
2 files changed, 9 insertions, 3 deletions
diff --git a/lib/inets/test/http_format_SUITE.erl b/lib/inets/test/http_format_SUITE.erl
index 9a13ed3d17..647eff4f7c 100644
--- a/lib/inets/test/http_format_SUITE.erl
+++ b/lib/inets/test/http_format_SUITE.erl
@@ -536,7 +536,10 @@ esi_parse_headers(Config) when is_list(Config) ->
httpd_esi:handle_headers(Headers2),
{ok,[{"location","/foo/bar.html"}], 302} =
- httpd_esi:handle_headers("location:/foo/bar.html\r\n").
+ httpd_esi:handle_headers("location:/foo/bar.html\r\n"),
+
+ {ok,[{"location","http://foo/bar.html"}],201} =
+ httpd_esi:handle_headers("status:201 Created\r\nlocation:http://foo/bar.html\r\n").
%%--------------------------------------------------------------------
cgi_parse_headers() ->
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index 0c649d9abf..9a85c51d24 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -923,8 +923,11 @@ esi(Config) when is_list(Config) ->
{no_header, "cache-control"}]),
ok = http_status("GET /cgi-bin/erl/httpd_example:peer ",
Config, [{statuscode, 200},
- {header, "peer-cert-exist", peer(Config)}]).
-
+ {header, "peer-cert-exist", peer(Config)}]),
+ ok = http_status("GET /cgi-bin/erl/httpd_example:new_status_and_location ",
+ Config, [{statuscode, 201},
+ {header, "location"}]).
+
%%-------------------------------------------------------------------------
esi_put() ->
[{doc, "Test mod_esi PUT"}].