aboutsummaryrefslogtreecommitdiffstats
path: root/lib/inets/test
diff options
context:
space:
mode:
authorIngela Anderton Andin <[email protected]>2017-10-26 09:48:08 +0200
committerIngela Anderton Andin <[email protected]>2017-10-26 09:48:08 +0200
commit20af6471398302330073f9ee8325bc018e5959bf (patch)
tree748c22c08e199f7da4f3658d28d6622437bd4677 /lib/inets/test
parent7fb796ab3636af53a7ef659099c1fb9fe37c1957 (diff)
parent15f71894d82af204eb10589339c3180579e55e20 (diff)
downloadotp-20af6471398302330073f9ee8325bc018e5959bf.tar.gz
otp-20af6471398302330073f9ee8325bc018e5959bf.tar.bz2
otp-20af6471398302330073f9ee8325bc018e5959bf.zip
Merge branch 'ingela/inets/not-chunked-esi/OTP-14656' into maint
* ingela/inets/not-chunked-esi/OTP-14656: inets: httpd - Fix broken handling of POST requests
Diffstat (limited to 'lib/inets/test')
-rw-r--r--lib/inets/test/httpd_SUITE.erl17
1 files changed, 15 insertions, 2 deletions
diff --git a/lib/inets/test/httpd_SUITE.erl b/lib/inets/test/httpd_SUITE.erl
index 6c8728470b..0c649d9abf 100644
--- a/lib/inets/test/httpd_SUITE.erl
+++ b/lib/inets/test/httpd_SUITE.erl
@@ -129,7 +129,7 @@ groups() ->
{http_1_1, [],
[host, chunked, expect, cgi, cgi_chunked_encoding_test,
trace, range, if_modified_since, mod_esi_chunk_timeout,
- esi_put] ++ http_head() ++ http_get() ++ load()},
+ esi_put, esi_post] ++ http_head() ++ http_get() ++ load()},
{http_1_0, [], [host, cgi, trace] ++ http_head() ++ http_get() ++ load()},
{http_0_9, [], http_head() ++ http_get() ++ load()}
].
@@ -932,7 +932,20 @@ esi_put() ->
esi_put(Config) when is_list(Config) ->
ok = http_status("PUT /cgi-bin/erl/httpd_example/put/123342234123 ",
Config, [{statuscode, 200}]).
-
+%%-------------------------------------------------------------------------
+esi_post() ->
+ [{doc, "Test mod_esi POST"}].
+
+esi_post(Config) when is_list(Config) ->
+ Chunk = "ZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZZ",
+ Data = lists:duplicate(10000, Chunk),
+ Length = lists:flatlength(Data),
+ ok = http_status("POST /cgi-bin/erl/httpd_example/post ",
+ {"Content-Length:" ++ integer_to_list(Length) ++ "\r\n",
+ Data},
+ [{http_version, "HTTP/1.1"} |Config],
+ [{statuscode, 200}]).
+
%%-------------------------------------------------------------------------
mod_esi_chunk_timeout(Config) when is_list(Config) ->
ok = httpd_1_1:mod_esi_chunk_timeout(proplists:get_value(type, Config),