diff options
author | Raimo Niskanen <[email protected]> | 2016-07-14 15:32:34 +0200 |
---|---|---|
committer | Ingela Anderton Andin <[email protected]> | 2016-08-08 16:25:13 +0200 |
commit | 3f20ad0206f118fe172963a351ac42f67ec6d1cb (patch) | |
tree | 2466528b391de60ba76ea5bbc3a03281d65ca304 /lib/inets/src/http_server/httpd_example.erl | |
parent | 67434e928c5d8c5562be5d2912243f49051d19ea (diff) | |
download | otp-3f20ad0206f118fe172963a351ac42f67ec6d1cb.tar.gz otp-3f20ad0206f118fe172963a351ac42f67ec6d1cb.tar.bz2 otp-3f20ad0206f118fe172963a351ac42f67ec6d1cb.zip |
inets: Add mod_esi test for PUT
Diffstat (limited to 'lib/inets/src/http_server/httpd_example.erl')
-rw-r--r-- | lib/inets/src/http_server/httpd_example.erl | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/inets/src/http_server/httpd_example.erl b/lib/inets/src/http_server/httpd_example.erl index 424d269859..c893b10dca 100644 --- a/lib/inets/src/http_server/httpd_example.erl +++ b/lib/inets/src/http_server/httpd_example.erl @@ -20,7 +20,7 @@ %% -module(httpd_example). -export([print/1]). --export([get/2, post/2, yahoo/2, test1/2, get_bin/2, peer/2]). +-export([get/2, put/2, post/2, yahoo/2, test1/2, get_bin/2, peer/2]). -export([newformat/3]). %% These are used by the inets test-suite @@ -59,6 +59,11 @@ get(_Env,[]) -> get(Env,Input) -> default(Env,Input). +put(Env,{Input,_Body}) -> + default(Env,Input); +put(Env,Input) -> + default(Env,Input). + get_bin(_Env,_Input) -> [list_to_binary(header()), list_to_binary(top("GET Example")), @@ -94,7 +99,7 @@ default(Env,Input) -> io_lib:format("~p",[httpd:parse_query(Input)]),"\n", footer()]. -peer(Env, Input) -> +peer(Env, _Input) -> Header = case proplists:get_value(peer_cert, Env) of undefined -> @@ -161,7 +166,7 @@ sleep(T) -> receive after T -> ok end. %% ------------------------------------------------------ -chunk_timeout(SessionID, _, StrInt) -> +chunk_timeout(SessionID, _, _StrInt) -> mod_esi:deliver(SessionID, "Tranfer-Encoding:chunked/html\r\n\r\n"), mod_esi:deliver(SessionID, top("Test chunk encoding timeout")), timer:sleep(20000), |